Skip to content

Commit

Permalink
Change: Update digest algo OID to string mapping
Browse files Browse the repository at this point in the history
(cherry picked from commit c36c7a9)
  • Loading branch information
ArnoStiefvater authored and mergify-bot committed Oct 26, 2021
1 parent 5343d87 commit 95e8eef
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions nasl/nasl_cert.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,20 @@ get_oid_name (const char *oid)
return "dhpublicnumber";
else if (!strcmp ("2.16.840.1.101.2.1.1.22", oid))
return "id-keyExchangeAlgorithm";
else if (!strcmp ("1.2.840.10045.1.1", oid))
return "prime-field";
else if (!strcmp ("1.2.840.10045.2.1", oid))
return "id-ecPublicKey";
else if (!strcmp ("1.2.840.10045.4.1", oid))
return "ecdsa-with-SHA1";
else if (!strcmp ("1.2.840.10045.4.3.1", oid))
return "ecdsa-with-SHA224";
else if (!strcmp ("1.2.840.10045.4.3.2", oid))
return "ecdsa-with-SHA256";
else if (!strcmp ("1.2.840.10045.4.3.3", oid))
return "ecdsa-with-SHA384";
else if (!strcmp ("1.2.840.10045.4.3.4", oid))
return "ecdsa-with-SHA512";
else if (!strcmp ("1.3.132.1.12", oid))
return "id-ecDH";
else if (!strcmp ("1.2.840.10045.2.13", oid))
Expand Down Expand Up @@ -634,6 +646,18 @@ get_oid_name (const char *oid)
return "sect571k1";
else if (!strcmp ("1.3.132.0.39", oid))
return "sect571r1";
else if (!strcmp ("2.16.840.1.101.3.4.3.1", oid))
return "id-dsa-with-sha224";
else if (!strcmp ("2.16.840.1.101.3.4.3.2", oid))
return "id-dsa-with-sha256";
else if (!strcmp ("2.16.840.1.101.3.4.2.1", oid))
return "sha256";
else if (!strcmp ("2.16.840.1.101.3.4.2.2", oid))
return "sha384";
else if (!strcmp ("2.16.840.1.101.3.4.2.3", oid))
return "sha512";
else if (!strcmp ("2.16.840.1.101.3.4.2.4", oid))
return "sha224";
else
return NULL;
}
Expand Down

0 comments on commit 95e8eef

Please sign in to comment.