diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-19 14:11:17 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-19 14:11:17 +0000 |
commit | 59fa437a67700abc30411251ef8c6efe69bb347f (patch) | |
tree | 694465988cdcb2c31ea02176f3d64604b188c086 /net/base/x509_certificate.h | |
parent | fd6182cba02a9e95ca7e51e87f0adc0fdc436061 (diff) | |
download | chromium_src-59fa437a67700abc30411251ef8c6efe69bb347f.zip chromium_src-59fa437a67700abc30411251ef8c6efe69bb347f.tar.gz chromium_src-59fa437a67700abc30411251ef8c6efe69bb347f.tar.bz2 |
Add a byte factory method for unit testing.
Review URL: http://codereview.chromium.org/2975
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate.h')
-rw-r--r-- | net/base/x509_certificate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h index 645454e..763084b 100644 --- a/net/base/x509_certificate.h +++ b/net/base/x509_certificate.h @@ -110,6 +110,10 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> { // X509Certificate will properly dispose of |cert_handle| for you. static X509Certificate* CreateFromHandle(OSCertHandle cert_handle); + // Create an X509Certificate from the BER-encoded representation. + // Returns NULL on failure. + static X509Certificate* CreateFromBytes(const char* data, int length); + // Create an X509Certificate from the representation stored in the given // pickle. The data for this object is found relative to the given // pickle_iter, which should be passed to the pickle's various Read* methods. |