summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi/mechglue/g_initialize.c
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-09-17 15:12:29 -0400
committerGreg Hudson <ghudson@mit.edu>2012-09-17 15:12:29 -0400
commit5b7a01a8a57449f20cb01e490e3b1e9dbc8b8661 (patch)
tree772d829e3d1af80c9b5308dce569ee18a05cf0ed /src/lib/gssapi/mechglue/g_initialize.c
parent1a3b93eff574d6617547602ffc3acea82d660928 (diff)
downloadkrb5-5b7a01a8a57449f20cb01e490e3b1e9dbc8b8661.tar.gz
krb5-5b7a01a8a57449f20cb01e490e3b1e9dbc8b8661.tar.xz
krb5-5b7a01a8a57449f20cb01e490e3b1e9dbc8b8661.zip
Delete unused internal mechglue functions
Get rid of gssint_get_mechanisms, gssint_mech_to_oid, and gssint_oid_to_mech, which constructed a list of mechanism names and mapped between mech names and OIDs. These functions were only used by gss_inquire_mechs_for_name, which now uses gss_indicate_mechs instead.
Diffstat (limited to 'src/lib/gssapi/mechglue/g_initialize.c')
-rw-r--r--src/lib/gssapi/mechglue/g_initialize.c108
1 files changed, 0 insertions, 108 deletions
diff --git a/src/lib/gssapi/mechglue/g_initialize.c b/src/lib/gssapi/mechglue/g_initialize.c
index abba914da4..9749cf72b1 100644
--- a/src/lib/gssapi/mechglue/g_initialize.c
+++ b/src/lib/gssapi/mechglue/g_initialize.c
@@ -414,114 +414,6 @@ const gss_OID oid;
} /* gssint_get_modOptions */
/*
- * given a mechanism string return the mechanism oid
- */
-OM_uint32
-gssint_mech_to_oid(const char *mechStr, gss_OID* oid)
-{
- gss_mech_info aMech;
-
- if (oid == NULL)
- return (GSS_S_CALL_INACCESSIBLE_WRITE);
-
- *oid = GSS_C_NULL_OID;
-
- if (gssint_mechglue_initialize_library() != 0)
- return (GSS_S_FAILURE);
-
- if ((mechStr == NULL) || (strlen(mechStr) == 0) ||
- (strcasecmp(mechStr, M_DEFAULT) == 0))
- return (GSS_S_COMPLETE);
-
- /* ensure we have fresh data */
- if (k5_mutex_lock(&g_mechListLock) != 0)
- return GSS_S_FAILURE;
- updateMechList();
- (void) k5_mutex_unlock(&g_mechListLock);
-
- aMech = g_mechList;
-
- /* no lock required - only looking at fields that are not updated */
- while (aMech != NULL) {
- if ((aMech->mechNameStr) &&
- strcmp(aMech->mechNameStr, mechStr) == 0) {
- *oid = aMech->mech_type;
- return (GSS_S_COMPLETE);
- }
- aMech = aMech->next;
- }
- return (GSS_S_FAILURE);
-} /* gssint_mech_to_oid */
-
-
-/*
- * Given the mechanism oid, return the readable mechanism name
- * associated with that oid from the mech config file
- * (/etc/gss/mech).
- */
-const char *
-gssint_oid_to_mech(const gss_OID oid)
-{
- gss_mech_info aMech;
-
- if (oid == GSS_C_NULL_OID)
- return (M_DEFAULT);
-
- if (gssint_mechglue_initialize_library() != 0)
- return (NULL);
-
- /* ensure we have fresh data */
- if (k5_mutex_lock(&g_mechListLock) != 0)
- return NULL;
- updateMechList();
- aMech = searchMechList(oid);
- (void) k5_mutex_unlock(&g_mechListLock);
-
- if (aMech == NULL)
- return (NULL);
-
- return (aMech->mechNameStr);
-} /* gssint_oid_to_mech */
-
-
-/*
- * return a list of mechanism strings supported
- * upon return the array is terminated with a NULL entry
- */
-OM_uint32
-gssint_get_mechanisms(char *mechArray[], int arrayLen)
-{
- gss_mech_info aMech;
- int i;
-
- if (mechArray == NULL || arrayLen < 1)
- return (GSS_S_CALL_INACCESSIBLE_WRITE);
-
- if (gssint_mechglue_initialize_library() != 0)
- return (GSS_S_FAILURE);
-
- /* ensure we have fresh data */
- if (k5_mutex_lock(&g_mechListLock) != 0)
- return GSS_S_FAILURE;
- updateMechList();
- (void) k5_mutex_unlock(&g_mechListLock);
-
- aMech = g_mechList;
-
- /* no lock required - only looking at fields that are not updated */
- for (i = 1; i < arrayLen; i++) {
- if (aMech != NULL) {
- *mechArray = aMech->mechNameStr;
- mechArray++;
- aMech = aMech->next;
- } else
- break;
- }
- *mechArray = NULL;
- return (GSS_S_COMPLETE);
-} /* gss_get_mechanisms */
-
-/*
* determines if the mechList needs to be updated from file
* and performs the update.
* this functions must be called with a lock of g_mechListLock