]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Remove NSS_LOOKUP_STRING code since we aren't likely to need it
authorGreg Hudson <ghudson@mit.edu>
Wed, 29 Sep 2010 18:03:48 +0000 (18:03 +0000)
committerGreg Hudson <ghudson@mit.edu>
Wed, 29 Sep 2010 18:03:48 +0000 (18:03 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/nss@24374 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/nss/hmac.c

index a77f3d4adfba5ff46815a11d7936981553c52aa2..60ad8198f2dc5c875171d3f30b50094f50315025 100644 (file)
 static CK_MECHANISM_TYPE
 digest_to_hmac(const struct krb5_hash_provider *hash)
 {
-#ifdef NSS_LOOKUP_STRING
-    SECOidTag hashTag, hmacTag;
-    SECOidData *oid;
-#endif
-
     /* use strcmp so we don't confuse SHA1 with SHA128 */
     /* handle the obvious cases first */
     if (!strcmp(hash->hash_name, "SHA1"))
         return CKM_SHA_1_HMAC;
     if (!strcmp(hash->hash_name, "MD5"))
         return CKM_MD5_HMAC;
-    /* the following coudes needs HASH_GetHMACOidTagByHashOidTag() to be
-     * exported before it will work */
-#ifdef NSS_LOOKUP_STRING
-    /* See if the currently loaded version of NSS recognizes this hash */
-    hmacTag = SEC_OID_UNKNOWN;
-    for (hashTag=1; (oid=SECOID_FindOIDByTag(hashTag)) != NULL; hashTag++) {
-        if (oid->mechanism == CKM_INVALID_MECHANISM)
-            continue;
-        if (!strcasecmp(oid->desc, hash->hash_name))
-            continue;
-        /* now map the hash oid to an hmac oid */
-        hmacTag = HASH_GetHMACOidTagByHashOidTag(hashTag);
-                  HASH_GetHMACOidTagByHashOidTag
-        if (hmacTag != SEC_OID_UNKNOWN)
-            break;
-    }
-    oid = SECOID_FindOIDByTag(hmacTag);
-    if (oid) {
-        return oid->mechanism;
-    }
-#endif
     return CKM_INVALID_MECHANISM;
 }