Index: net/cert/cert_verify_proc.h |
diff --git a/net/cert/cert_verify_proc.h b/net/cert/cert_verify_proc.h |
index 352610f22e54d073a735b790eb568be1fc839bff..80d1f685566b4248e119c2e467288f0a54e0a000 100644 |
--- a/net/cert/cert_verify_proc.h |
+++ b/net/cert/cert_verify_proc.h |
@@ -14,6 +14,7 @@ |
#include "base/memory/ref_counted.h" |
#include "net/base/net_export.h" |
#include "net/cert/x509_cert_types.h" |
+#include "net/cert/x509_certificate.h" |
namespace net { |
@@ -134,6 +135,21 @@ class NET_EXPORT CertVerifyProc |
DISALLOW_COPY_AND_ASSIGN(CertVerifyProc); |
}; |
+// Sets the weak signature hash fields of |verify_result| to true if |
+// applicable for |cert|, otherwise does not modify them. |
+// |
+// The fields in question are: |has_md2|, |has_md4|, |has_md5|,|has_sha1| and |
+// |has_sha1_leaf|. |
+// |
+// Returns true if any of the fields were set to true (meaning the |
+// certificate uses a weak signature). |
+// |
+// This function is intended to be used as a helper by platform-specific |
+// CertVerifyProc implementations. |
+bool FillCertVerifyResultWeakSignature(X509Certificate::OSCertHandle cert, |
Ryan Sleevi
2017/01/05 22:48:24
DESIGN: From the header, it's unclear why the bool
Ryan Sleevi
2017/01/05 22:48:24
DESIGN: Does this need to be a free function in th
Ryan Sleevi
2017/01/05 22:48:24
NAMING: The "FillCertVerifyResult" feels redundant
eroman
2017/01/05 23:21:53
RE: Static method vs free-floating function
The co
eroman
2017/01/05 23:36:30
No longer returns a bool -- now returns the algori
eroman
2017/01/05 23:36:30
I haven't changed the name yet.
I am not sure abo
Ryan Sleevi
2017/01/05 23:46:30
I'm wondering whether we could/should consider upl
eroman
2017/01/06 00:47:23
That sounds plausible, however TBH I am trying to
|
+ bool is_leaf, |
+ CertVerifyResult* verify_result); |
+ |
} // namespace net |
#endif // NET_CERT_CERT_VERIFY_PROC_H_ |