diff options
Diffstat (limited to 'source3/librpc/crypto')
-rw-r--r-- | source3/librpc/crypto/cli_spnego.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/librpc/crypto/cli_spnego.c b/source3/librpc/crypto/cli_spnego.c index 31d0157069..c81b424af3 100644 --- a/source3/librpc/crypto/cli_spnego.c +++ b/source3/librpc/crypto/cli_spnego.c @@ -330,13 +330,18 @@ NTSTATUS spnego_get_negotiated_mech(struct spnego_context *sp_ctx, DATA_BLOB spnego_get_session_key(TALLOC_CTX *mem_ctx, struct spnego_context *sp_ctx) { + DATA_BLOB sk; + NTSTATUS status; switch (sp_ctx->mech) { case SPNEGO_KRB5: return gse_get_session_key(mem_ctx, sp_ctx->mech_ctx.gssapi_state); case SPNEGO_NTLMSSP: - return auth_ntlmssp_get_session_key( - sp_ctx->mech_ctx.ntlmssp_state, mem_ctx); + status = gensec_session_key(sp_ctx->mech_ctx.ntlmssp_state->gensec_security, mem_ctx, &sk); + if (!NT_STATUS_IS_OK(status)) { + return data_blob_null; + } + return sk; default: DEBUG(0, ("Unsupported type in request!\n")); return data_blob_null; |