You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
diff --git a/lib/util/nsshash.c b/lib/util/nsshash.c
|
|
--- a/lib/util/nsshash.c
|
|
+++ b/lib/util/nsshash.c
|
|
@@ -102,16 +102,19 @@ HASH_GetHashOidTagByHashType(HASH_HashTy
|
|
SECOidTag
|
|
HASH_GetHashOidTagByHMACOidTag(SECOidTag hmacOid)
|
|
{
|
|
SECOidTag hashOid = SEC_OID_UNKNOWN;
|
|
|
|
switch (hmacOid) {
|
|
/* no oid exists for HMAC_MD2 */
|
|
/* NSS does not define a oid for HMAC_MD4 */
|
|
+ case SEC_OID_HMAC_MD5:
|
|
+ hashOid = SEC_OID_MD5;
|
|
+ break;
|
|
case SEC_OID_HMAC_SHA1:
|
|
hashOid = SEC_OID_SHA1;
|
|
break;
|
|
case SEC_OID_HMAC_SHA224:
|
|
hashOid = SEC_OID_SHA224;
|
|
break;
|
|
case SEC_OID_HMAC_SHA256:
|
|
hashOid = SEC_OID_SHA256;
|
|
@@ -145,16 +148,19 @@ HASH_GetHashOidTagByHMACOidTag(SECOidTag
|
|
SECOidTag
|
|
HASH_GetHMACOidTagByHashOidTag(SECOidTag hashOid)
|
|
{
|
|
SECOidTag hmacOid = SEC_OID_UNKNOWN;
|
|
|
|
switch (hashOid) {
|
|
/* no oid exists for HMAC_MD2 */
|
|
/* NSS does not define a oid for HMAC_MD4 */
|
|
+ case SEC_OID_MD5:
|
|
+ hmacOid = SEC_OID_HMAC_MD5;
|
|
+ break;
|
|
case SEC_OID_SHA1:
|
|
hmacOid = SEC_OID_HMAC_SHA1;
|
|
break;
|
|
case SEC_OID_SHA224:
|
|
hmacOid = SEC_OID_HMAC_SHA224;
|
|
break;
|
|
case SEC_OID_SHA256:
|
|
hmacOid = SEC_OID_HMAC_SHA256;
|