From 0879254d5371bf8ffd426a665ff95417858b994d Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sat, 10 Sep 2011 20:12:08 +0100 Subject: [PATCH] add GSS_EAP_CRED_SET_CRED_PASSWORD cred option --- mech_eap/gssapi_eap.h | 7 +++++++ mech_eap/mech_eap.exports | 4 ++++ mech_eap/set_cred_option.c | 15 +++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/mech_eap/gssapi_eap.h b/mech_eap/gssapi_eap.h index 9f713ec..588665b 100644 --- a/mech_eap/gssapi_eap.h +++ b/mech_eap/gssapi_eap.h @@ -71,6 +71,13 @@ extern gss_OID GSS_EAP_CRED_SET_RADIUS_CONFIG_STANZA; extern gss_OID GSS_EAP_CRED_SET_CRED_FLAG; /* + * Password; for mechanism glues that do not support + * gss_acquire_cred_with_password(), this can be set + * on an existing credentials handle. + */ +extern gss_OID GSS_EAP_CRED_SET_CRED_PASSWORD; + +/* * Credentials flag indicating the local attributes * processing should be skipped. */ diff --git a/mech_eap/mech_eap.exports b/mech_eap/mech_eap.exports index 12f7f54..34a26bf 100644 --- a/mech_eap/mech_eap.exports +++ b/mech_eap/mech_eap.exports @@ -50,6 +50,10 @@ gss_wrap_size_limit GSS_EAP_AES128_CTS_HMAC_SHA1_96_MECHANISM GSS_EAP_AES256_CTS_HMAC_SHA1_96_MECHANISM GSS_EAP_NT_EAP_NAME +GSS_EAP_CRED_SET_CRED_FLAG +GSS_EAP_CRED_SET_CRED_PASSWORD +GSS_EAP_CRED_SET_RADIUS_CONFIG_FILE +GSS_EAP_CRED_SET_RADIUS_CONFIG_STANZA gssspi_acquire_cred_with_password gssspi_authorize_localname gssspi_set_cred_option diff --git a/mech_eap/set_cred_option.c b/mech_eap/set_cred_option.c index 03c95fd..7bb9b7b 100644 --- a/mech_eap/set_cred_option.c +++ b/mech_eap/set_cred_option.c @@ -112,6 +112,15 @@ setCredFlag(OM_uint32 *minor, return GSS_S_COMPLETE; } +static OM_uint32 +setCredPassword(OM_uint32 *minor, + gss_cred_id_t cred, + const gss_OID oid GSSEAP_UNUSED, + const gss_buffer_t buffer) +{ + return gssEapSetCredPassword(minor, cred, buffer); +} + static struct { gss_OID_desc oid; OM_uint32 (*setOption)(OM_uint32 *, gss_cred_id_t cred, @@ -132,11 +141,17 @@ static struct { { 11, "\x2B\x06\x01\x04\x01\xA9\x4A\x16\x03\x03\x03" }, setCredFlag, }, + /* 1.3.6.1.4.1.5322.22.3.3.4 */ + { + { 11, "\x2B\x06\x01\x04\x01\xA9\x4A\x16\x03\x03\x04" }, + setCredPassword, + }, }; gss_OID GSS_EAP_CRED_SET_RADIUS_CONFIG_FILE = &setCredOps[0].oid; gss_OID GSS_EAP_CRED_SET_RADIUS_CONFIG_STANZA = &setCredOps[1].oid; gss_OID GSS_EAP_CRED_SET_CRED_FLAG = &setCredOps[2].oid; +gss_OID GSS_EAP_CRED_SET_CRED_PASSWORD = &setCredOps[3].oid; OM_uint32 GSSAPI_CALLCONV gssspi_set_cred_option(OM_uint32 *minor, -- 2.1.4