add GSS_EAP_CRED_SET_CRED_PASSWORD cred option
authorLuke Howard <lukeh@padl.com>
Sat, 10 Sep 2011 19:12:08 +0000 (20:12 +0100)
committerLuke Howard <lukeh@padl.com>
Sat, 10 Sep 2011 19:12:08 +0000 (20:12 +0100)
mech_eap/gssapi_eap.h
mech_eap/mech_eap.exports
mech_eap/set_cred_option.c

index 9f713ec..588665b 100644 (file)
@@ -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.
  */
index 12f7f54..34a26bf 100644 (file)
@@ -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
index 03c95fd..7bb9b7b 100644 (file)
@@ -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,