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

Unified Diff: net/cert/x509_certificate_win.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_openssl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_certificate_win.cc
diff --git a/net/cert/x509_certificate_win.cc b/net/cert/x509_certificate_win.cc
index ef3d040e5df1148055309e632c95384f02b885b7..c67011e06b9c783059b0804c2eb3e97fad473b30 100644
--- a/net/cert/x509_certificate_win.cc
+++ b/net/cert/x509_certificate_win.cc
@@ -421,33 +421,6 @@ void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
}
}
-X509Certificate::SignatureHashAlgorithm
-X509Certificate::GetSignatureHashAlgorithm(OSCertHandle cert_handle) {
- const char* algorithm = cert_handle->pCertInfo->SignatureAlgorithm.pszObjId;
- if (strcmp(algorithm, szOID_RSA_MD5RSA) == 0) {
- // md5WithRSAEncryption: 1.2.840.113549.1.1.4
- return kSignatureHashAlgorithmMd5;
- }
- if (strcmp(algorithm, szOID_RSA_MD2RSA) == 0) {
- // md2WithRSAEncryption: 1.2.840.113549.1.1.2
- return kSignatureHashAlgorithmMd2;
- }
- if (strcmp(algorithm, szOID_RSA_MD4RSA) == 0) {
- // md4WithRSAEncryption: 1.2.840.113549.1.1.3
- return kSignatureHashAlgorithmMd4;
- }
- if (strcmp(algorithm, szOID_RSA_SHA1RSA) == 0 ||
- strcmp(algorithm, szOID_X957_SHA1DSA) == 0 ||
- strcmp(algorithm, szOID_ECDSA_SHA1) == 0) {
- // sha1WithRSAEncryption: 1.2.840.113549.1.1.5
- // id-dsa-with-sha1: 1.2.840.10040.4.3
- // ecdsa-with-SHA1: 1.2.840.10045.4.1
- return kSignatureHashAlgorithmSha1;
- }
-
- return kSignatureHashAlgorithmOther;
-}
-
bool X509Certificate::IsIssuedByEncoded(
const std::vector<std::string>& valid_issuers) {
« no previous file with comments | « net/cert/x509_certificate_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698