1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

s3-librpc Remove special case for spnego session key

SPNEGO is implemented only in terms of gensec mechanisms now.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andrew Bartlett 2012-01-03 22:00:11 +11:00 committed by Stefan Metzmacher
parent 1818612830
commit f2efb0f6a3
3 changed files with 8 additions and 16 deletions

View File

@ -283,18 +283,6 @@ NTSTATUS spnego_get_negotiated_mech(struct spnego_context *sp_ctx,
return NT_STATUS_OK;
}
DATA_BLOB spnego_get_session_key(TALLOC_CTX *mem_ctx,
struct spnego_context *sp_ctx)
{
DATA_BLOB sk;
NTSTATUS status;
status = gensec_session_key(sp_ctx->gensec_security, mem_ctx, &sk);
if (!NT_STATUS_IS_OK(status)) {
return data_blob_null;
}
return sk;
}
NTSTATUS spnego_sign(TALLOC_CTX *mem_ctx,
struct spnego_context *sp_ctx,
DATA_BLOB *data, DATA_BLOB *full_data,

View File

@ -72,9 +72,6 @@ bool spnego_require_more_processing(struct spnego_context *sp_ctx);
NTSTATUS spnego_get_negotiated_mech(struct spnego_context *sp_ctx,
struct gensec_security **auth_context);
DATA_BLOB spnego_get_session_key(TALLOC_CTX *mem_ctx,
struct spnego_context *sp_ctx);
NTSTATUS spnego_sign(TALLOC_CTX *mem_ctx,
struct spnego_context *sp_ctx,
DATA_BLOB *data, DATA_BLOB *full_data,

View File

@ -3113,7 +3113,14 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
case DCERPC_AUTH_TYPE_SPNEGO:
spnego_ctx = talloc_get_type_abort(a->auth_ctx,
struct spnego_context);
sk = spnego_get_session_key(mem_ctx, spnego_ctx);
status = spnego_get_negotiated_mech(spnego_ctx, &gensec_security);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
status = gensec_session_key(gensec_security, mem_ctx, &sk);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
make_dup = false;
break;
case DCERPC_AUTH_TYPE_NTLMSSP: