Index: net/cert/x509_certificate.h |
diff --git a/net/cert/x509_certificate.h b/net/cert/x509_certificate.h |
index 613bd09509004301c7d4f4e72d6704733df5c717..25097c03e7f933d072a7ae9892e82d160b48c991 100644 |
--- a/net/cert/x509_certificate.h |
+++ b/net/cert/x509_certificate.h |
@@ -80,6 +80,15 @@ class NET_EXPORT X509Certificate |
kPublicKeyTypeECDH |
}; |
+ // Enumeration for weak hashing algorithms. |
Ryan Sleevi
2017/01/05 22:48:24
This feels very much like a tighter coupling.
Tha
eroman
2017/01/05 23:21:53
Sure, I will remove the comment about it being "we
eroman
2017/01/05 23:36:30
Done.
|
+ enum SignatureHashAlgorithm { |
+ kSignatureHashAlgorithmMd2, |
+ kSignatureHashAlgorithmMd4, |
+ kSignatureHashAlgorithmMd5, |
+ kSignatureHashAlgorithmSha1, |
+ kSignatureHashAlgorithmOther, |
+ }; |
+ |
enum Format { |
// The data contains a single DER-encoded certificate, or a PEM-encoded |
// DER certificate with the PEM encoding block name of "CERTIFICATE". |
@@ -327,6 +336,12 @@ class NET_EXPORT X509Certificate |
size_t* size_bits, |
PublicKeyType* type); |
+ // Returns the hashing algorithm used by |cert_handle|. If the hashing |
+ // algorithm is NOT one of the enumerated weak ones, OR the implementation |
+ // fails, then will return kSignatureHashAlgorithmOther. |
Ryan Sleevi
2017/01/05 22:48:24
// Returns the digest algorithm used in |cert_hand
eroman
2017/01/05 23:36:30
Done.
|
+ static SignatureHashAlgorithm GetSignatureHashAlgorithm( |
+ OSCertHandle cert_handle); |
+ |
// Returns the OSCertHandle of this object. Because of caching, this may |
// differ from the OSCertHandle originally supplied during initialization. |
// Note: On Windows, CryptoAPI may return unexpected results if this handle |