diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 09:54:15 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 09:54:15 +0000 |
commit | f61c397ae7c8d07762b02d6578928163e2a8eca0 (patch) | |
tree | 3c029791e1a36b1218b5378c5e7b579d84023755 /net/base/x509_certificate_mac.cc | |
parent | 88616f47602e8a2a16c65ca0a59444e0ce550772 (diff) | |
download | chromium_src-f61c397ae7c8d07762b02d6578928163e2a8eca0.zip chromium_src-f61c397ae7c8d07762b02d6578928163e2a8eca0.tar.gz chromium_src-f61c397ae7c8d07762b02d6578928163e2a8eca0.tar.bz2 |
Defines SSLServerSocket and implements SSLServerSocketNSS
Defines a SSLServerSocket interface. Implement this interface using NSS as
SSLServerSocketNSS.
This is the first version of the code. It disables several functions of NSS
like caching, session ticket, reneogotiation, etc. This is implemented to
suit the needs of Chromoting. Additional features of this socket will be added
when necessary.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/5746003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70041 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate_mac.cc')
-rw-r--r-- | net/base/x509_certificate_mac.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc index f7c89e4..fd965cb3 100644 --- a/net/base/x509_certificate_mac.cc +++ b/net/base/x509_certificate_mac.cc @@ -651,6 +651,17 @@ int X509Certificate::Verify(const std::string& hostname, int flags, return OK; } +bool X509Certificate::GetDEREncoded(std::string* encoded) { + encoded->clear(); + CSSM_DATA der_data; + if(SecCertificateGetData(cert_handle_, &der_data) == noErr) { + encoded->append(reinterpret_cast<char*>(der_data.Data), + der_data.Length); + return true; + } + return false; +} + bool X509Certificate::VerifyEV() const { // We don't call this private method, but we do need to implement it because // it's defined in x509_certificate.h. We perform EV checking in the |