Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: net/cert/x509_certificate_nss.cc

Issue 2731603002: Check TBSCertificate.algorithm and Certificate.signatureAlgorithm for (Closed)
Patch Set: Use rsleevi's background comment Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/x509_certificate_mac.cc ('k') | net/cert/x509_certificate_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_certificate_nss.cc
diff --git a/net/cert/x509_certificate_nss.cc b/net/cert/x509_certificate_nss.cc
index 2f2f97726629a7764dca228205b9ee0f2d7d2f76..822102fe153c3c0b89402e87cbc36809bae2522b 100644
--- a/net/cert/x509_certificate_nss.cc
+++ b/net/cert/x509_certificate_nss.cc
@@ -239,28 +239,6 @@ void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
}
// static
-X509Certificate::SignatureHashAlgorithm
-X509Certificate::GetSignatureHashAlgorithm(OSCertHandle cert_handle) {
- SECAlgorithmID& signature = cert_handle->signature;
- SECOidTag oid_tag = SECOID_FindOIDTag(&signature.algorithm);
- switch (oid_tag) {
- case SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION:
- return kSignatureHashAlgorithmMd5;
- case SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION:
- return kSignatureHashAlgorithmMd2;
- case SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION:
- return kSignatureHashAlgorithmMd4;
- case SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION:
- case SEC_OID_ISO_SHA1_WITH_RSA_SIGNATURE:
- case SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST:
- case SEC_OID_ANSIX962_ECDSA_SHA1_SIGNATURE:
- return kSignatureHashAlgorithmSha1;
- default:
- return kSignatureHashAlgorithmOther;
- }
-}
-
-// static
bool X509Certificate::IsSelfSigned(OSCertHandle cert_handle) {
crypto::ScopedSECKEYPublicKey public_key(CERT_ExtractPublicKey(cert_handle));
if (!public_key.get())
« no previous file with comments | « net/cert/x509_certificate_mac.cc ('k') | net/cert/x509_certificate_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698