X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=blobdiff_plain;f=mech_eap%2Fexport_sec_context.c;h=3b7436667d36113c73f52216ef0d925cb8ab716f;hp=e5be6d8670e025469345d211be8f5e1bd71c7afa;hb=HEAD;hpb=49c65b803b43e159e38f6a16505bad54de153916 diff --git a/mech_eap/export_sec_context.c b/mech_eap/export_sec_context.c index e5be6d8..3b74366 100644 --- a/mech_eap/export_sec_context.c +++ b/mech_eap/export_sec_context.c @@ -121,6 +121,11 @@ gssEapExportSecContext(OM_uint32 *minor, key.length = KRB_KEY_LENGTH(&ctx->rfc3961Key); key.value = KRB_KEY_DATA(&ctx->rfc3961Key); + /* + * As a shortcut, we omit the mechanism OID of the initiator name because + * we know it will match the context mechanism. The acceptor name mech OID + * is always included. + */ if (ctx->initiatorName != GSS_C_NO_NAME) { major = gssEapExportNameInternal(minor, ctx->initiatorName, &initiatorName, @@ -132,7 +137,7 @@ gssEapExportSecContext(OM_uint32 *minor, if (ctx->acceptorName != GSS_C_NO_NAME) { major = gssEapExportNameInternal(minor, ctx->acceptorName, &acceptorName, - EXPORT_NAME_FLAG_COMPOSITE); + EXPORT_NAME_FLAG_OID | EXPORT_NAME_FLAG_COMPOSITE); if (GSS_ERROR(major)) goto cleanup; }