LibTLS: Add SHA-384 as supported certificate signing algorithm

This commit is contained in:
Joaquim Monteiro 2022-02-13 16:00:04 +00:00 committed by Ali Mohammad Pur
parent d386d3946a
commit 3243091c0d
Notes: sideshowbarker 2024-07-17 18:54:46 +09:00
2 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,7 @@ constexpr static Array<int, 7>
rsa_md5_encryption_oid { 1, 2, 840, 113549, 1, 1, 4 },
rsa_sha1_encryption_oid { 1, 2, 840, 113549, 1, 1, 5 },
rsa_sha256_encryption_oid { 1, 2, 840, 113549, 1, 1, 11 },
rsa_sha384_encryption_oid { 1, 2, 840, 113549, 1, 1, 12 },
rsa_sha512_encryption_oid { 1, 2, 840, 113549, 1, 1, 13 };
constexpr static Array<int, 4>
@ -151,6 +152,8 @@ Optional<Certificate> Certificate::parse_asn1(ReadonlyBytes buffer, bool)
field = CertificateKeyAlgorithm ::RSA_SHA1;
else if (identifier == rsa_sha256_encryption_oid)
field = CertificateKeyAlgorithm ::RSA_SHA256;
else if (identifier == rsa_sha384_encryption_oid)
field = CertificateKeyAlgorithm ::RSA_SHA384;
else if (identifier == rsa_sha512_encryption_oid)
field = CertificateKeyAlgorithm ::RSA_SHA512;
else

View File

@ -23,6 +23,7 @@ enum class CertificateKeyAlgorithm {
RSA_MD5 = 0x04,
RSA_SHA1 = 0x05,
RSA_SHA256 = 0x0b,
RSA_SHA384 = 0x0c,
RSA_SHA512 = 0x0d,
};