diff options
author | Simo Sorce <simo@redhat.com> | 2012-02-09 01:31:30 -0500 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-02-09 01:36:07 -0500 |
commit | 0b357211ddfbcd0d6c9ea837b2975c69932903be (patch) | |
tree | a9d5f36331c007bc1535038e581c67c7379d4b0f /proxy/src/gp_conv.c | |
parent | 68ec1c0cfe7cd0e24fb6504808ddd0160c22c1e3 (diff) | |
download | gss-proxy-0b357211ddfbcd0d6c9ea837b2975c69932903be.tar.gz gss-proxy-0b357211ddfbcd0d6c9ea837b2975c69932903be.tar.xz gss-proxy-0b357211ddfbcd0d6c9ea837b2975c69932903be.zip |
gp_conv: Add function to import sec context
Diffstat (limited to 'proxy/src/gp_conv.c')
-rw-r--r-- | proxy/src/gp_conv.c | 16 |
1 files changed, 16 insertions, 0 deletions
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) |