From 984438ca1522bfc2d882b2e3e7e8db187577e05a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 29 Jul 2010 16:34:39 -0400 Subject: s3-dcerpc: add sign/seal support when using SPNEGO/KRB5 --- source3/librpc/rpc/dcerpc_spnego.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'source3/librpc/rpc/dcerpc_spnego.c') diff --git a/source3/librpc/rpc/dcerpc_spnego.c b/source3/librpc/rpc/dcerpc_spnego.c index 51d294de5e..e733469ac3 100644 --- a/source3/librpc/rpc/dcerpc_spnego.c +++ b/source3/librpc/rpc/dcerpc_spnego.c @@ -233,3 +233,22 @@ bool spnego_require_more_processing(struct spnego_context *sp_ctx) } } +NTSTATUS spnego_get_negotiated_mech(struct spnego_context *sp_ctx, + enum dcerpc_AuthType *auth_type, + void **auth_context) +{ + switch (sp_ctx->auth_type) { + case DCERPC_AUTH_TYPE_KRB5: + *auth_context = sp_ctx->mech_ctx.gssapi_state; + break; + case DCERPC_AUTH_TYPE_NTLMSSP: + *auth_context = sp_ctx->mech_ctx.auth_ntlmssp_state; + break; + default: + return NT_STATUS_INTERNAL_ERROR; + } + + *auth_type = sp_ctx->auth_type; + return NT_STATUS_OK; +} + -- cgit