diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 03:15:29 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 03:15:29 +0000 |
commit | 5bdf2b4b687c33bb83ed28bab6ed35da20a4d50e (patch) | |
tree | 7666e5405e74387c72715b12cde0292dc7bb0953 /net/base/x509_certificate.h | |
parent | 6e2ab656dcf1ecfbdf52b588ad7f9b212af0551d (diff) | |
download | chromium_src-5bdf2b4b687c33bb83ed28bab6ed35da20a4d50e.zip chromium_src-5bdf2b4b687c33bb83ed28bab6ed35da20a4d50e.tar.gz chromium_src-5bdf2b4b687c33bb83ed28bab6ed35da20a4d50e.tar.bz2 |
Make X509Certificate::GetDEREncoded a static function taking an OSCertHandle
Rather than require an X509Certificate*, which has additional processing
overhead, make X509Certificate::GetDEREncoded a static function which takes an
OSCertHandle. Callers which already have an X509Certificate* can easily use
->os_cert_handle(), while those that have an OSCertHandle, such as by way of
GetIntermediateCertificates(), can use the OSCertHandle directly.
BUG=91464
TEST=none
Review URL: http://codereview.chromium.org/8414047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate.h')
-rw-r--r-- | net/base/x509_certificate.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h index d862110..6d34437 100644 --- a/net/base/x509_certificate.h +++ b/net/base/x509_certificate.h @@ -393,10 +393,10 @@ class NET_EXPORT X509Certificate // Returns true if it matches. bool VerifyNameMatch(const std::string& hostname) const; - // This method returns the DER encoded certificate. - // If the return value is true then the DER encoded certificate is available. - // The content of the DER encoded certificate is written to |encoded|. - bool GetDEREncoded(std::string* encoded); + // Obtains the DER encoded certificate data for |cert_handle|. On success, + // returns true and writes the DER encoded certificate to |*der_encoded|. + static bool GetDEREncoded(OSCertHandle cert_handle, + std::string* der_encoded); // Returns the OSCertHandle of this object. Because of caching, this may // differ from the OSCertHandle originally supplied during initialization. |