From 0b357211ddfbcd0d6c9ea837b2975c69932903be Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 9 Feb 2012 01:31:30 -0500 Subject: gp_conv: Add function to import sec context --- proxy/src/gp_conv.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'proxy/src/gp_conv.c') diff --git a/proxy/src/gp_conv.c b/proxy/src/gp_conv.c index 7855203..07d66c2 100644 --- a/proxy/src/gp_conv.c +++ b/proxy/src/gp_conv.c @@ -538,6 +538,22 @@ done: return ret; } +int gp_conv_gssx_to_ctx_id(gssx_ctx *in, gss_ctx_id_t *out) +{ + gss_buffer_desc export_buffer = GSS_C_EMPTY_BUFFER; + uint32_t ret_maj; + uint32_t ret_min; + + gp_conv_gssx_to_buffer(in->exported_context_token, &export_buffer); + + ret_maj = gss_import_sec_context(&ret_min, &export_buffer, out); + if (ret_maj) { + return EINVAL; + } + + return 0; +} + int gp_conv_status_to_gssx(struct gssx_call_ctx *call_ctx, uint32_t ret_maj, uint32_t ret_min, gss_OID mech, struct gssx_status *status) -- cgit