summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/librpc/crypto/cli_spnego.c12
-rw-r--r--source3/librpc/crypto/spnego.h3
-rw-r--r--source3/rpc_client/cli_pipe.c9
3 files changed, 8 insertions, 16 deletions
diff --git a/source3/librpc/crypto/cli_spnego.c b/source3/librpc/crypto/cli_spnego.c
index d6956449e1..e676703c6b 100644
--- a/source3/librpc/crypto/cli_spnego.c
+++ b/source3/librpc/crypto/cli_spnego.c
@@ -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,
diff --git a/source3/librpc/crypto/spnego.h b/source3/librpc/crypto/spnego.h
index a054b593b2..b66ef4d152 100644
--- a/source3/librpc/crypto/spnego.h
+++ b/source3/librpc/crypto/spnego.h
@@ -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,
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index f3a334a052..9091d879b8 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -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: