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

Unified Diff: net/base/x509_certificate.h

Issue 8568040: Refuse to accept certificate chains containing any RSA public key smaller (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « no previous file | net/base/x509_certificate_mac.cc » ('j') | net/base/x509_certificate_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate.h
===================================================================
--- net/base/x509_certificate.h (revision 110129)
+++ net/base/x509_certificate.h (working copy)
@@ -74,6 +74,14 @@
typedef std::vector<OSCertHandle> OSCertHandles;
+ enum {
+ NONE,
+ RSA,
+ DSA,
+ ECDSA,
+ DH,
agl 2011/11/16 15:57:55 OTHER? (For example, ECDH. I wouldn't want code t
+ } PublicKeyType;
+
// Predicate functor used in maps when X509Certificate is used as the key.
class NET_EXPORT LessThan {
public:
@@ -404,6 +412,9 @@
// the first element.
bool GetPEMEncodedChain(std::vector<std::string>* pem_encoded) const;
+ // Returns the length of the public key in bits.
+ static unsigned int GetPublicKeyLengthInBits(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
« no previous file with comments | « no previous file | net/base/x509_certificate_mac.cc » ('j') | net/base/x509_certificate_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698