#include "../libcli/auth/spnego.h"
#include "include/ntlmssp_wrap.h"
#include "librpc/gen_ndr/ntlmssp.h"
+#include "libcli/auth/ntlmssp.h"
#include "librpc/crypto/gse.h"
#include "librpc/crypto/spnego.h"
NTLMSSP_NEGOTIATE_ALWAYS_SIGN |
NTLMSSP_NEGOTIATE_NTLM |
NTLMSSP_NEGOTIATE_NTLM2 |
- NTLMSSP_NEGOTIATE_KEY_EXCH |
- NTLMSSP_NEGOTIATE_SIGN |
- NTLMSSP_NEGOTIATE_SEAL;
+ NTLMSSP_NEGOTIATE_KEY_EXCH;
ntlmssp_state->server.netbios_name = talloc_strdup(ntlmssp_state, netbios_name);
if (!ntlmssp_state->server.netbios_name) {
return status;
}
- /* Clear flags, then set them according to requested flags */
- auth_ntlmssp_and_flags(a, ~(NTLMSSP_NEGOTIATE_SIGN |
- NTLMSSP_NEGOTIATE_SEAL));
-
if (do_sign) {
- auth_ntlmssp_or_flags(a, NTLMSSP_NEGOTIATE_SIGN);
+ auth_ntlmssp_want_feature(a, NTLMSSP_FEATURE_SIGN);
}
if (do_seal) {
/* Always implies both sign and seal for ntlmssp */
- auth_ntlmssp_or_flags(a, NTLMSSP_NEGOTIATE_SIGN |
- NTLMSSP_NEGOTIATE_SEAL);
+ auth_ntlmssp_want_feature(a, NTLMSSP_FEATURE_SEAL);
}
status = auth_ntlmssp_update(a, mem_ctx, *token_in, token_out);
return nt_status_squash(status);
}
+ auth_ntlmssp_want_feature(ec->auth_ntlmssp_state, NTLMSSP_FEATURE_SEAL);
+
/*
* We must remember to update the pointer copy for the common
* functions after any auth_ntlmssp_start/auth_ntlmssp_end.
return;
}
+ auth_ntlmssp_want_feature(*auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
+
status = auth_ntlmssp_update(*auth_ntlmssp_state, talloc_tos(),
- secblob, &chal);
+ secblob, &chal);
data_blob_free(&secblob);
goto out;
}
+ auth_ntlmssp_want_feature(session->auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
+
status = auth_ntlmssp_update(session->auth_ntlmssp_state,
talloc_tos(),
secblob_in,
return status;
}
+ (*ntlmssp_state)->neg_flags |=
+ (NTLMSSP_NEGOTIATE_SIGN |
+ NTLMSSP_NEGOTIATE_SEAL);
+
/* Have we been given a local password, or should we ask winbind? */
if (opt_password) {
(*ntlmssp_state)->check_password = local_pw_check;