diff options
author | ukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-01 06:33:13 +0000 |
---|---|---|
committer | ukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-01 06:33:13 +0000 |
commit | bd49af9f09124dc2442be3211995d2e2adc6964f (patch) | |
tree | 1ab4ca14d4925ba8979c163af75e970d7136ed8a /net | |
parent | 97d4797355ac01fb77ff5ee2697cbbd8facb9e19 (diff) | |
download | chromium_src-bd49af9f09124dc2442be3211995d2e2adc6964f.zip chromium_src-bd49af9f09124dc2442be3211995d2e2adc6964f.tar.gz chromium_src-bd49af9f09124dc2442be3211995d2e2adc6964f.tar.bz2 |
Move X509Certificate::HasExpired to x509_certificate.cc.
All versions have implemented valid_expiry(), so we can use
common code for X509Certificate::HasExpired.
R=wtc
Review URL: http://codereview.chromium.org/118069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/x509_certificate.cc | 5 | ||||
-rw-r--r-- | net/base/x509_certificate_mac.cc | 5 | ||||
-rw-r--r-- | net/base/x509_certificate_nss.cc | 5 | ||||
-rw-r--r-- | net/base/x509_certificate_win.cc | 4 |
4 files changed, 5 insertions, 14 deletions
diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc index 1655712..7a5a669 100644 --- a/net/base/x509_certificate.cc +++ b/net/base/x509_certificate.cc @@ -6,6 +6,7 @@ #include "base/histogram.h" #include "base/logging.h" +#include "base/time.h" namespace net { @@ -192,4 +193,8 @@ X509Certificate::~X509Certificate() { FreeOSCertHandle(cert_handle_); } +bool X509Certificate::HasExpired() const { + return base::Time::Now() > valid_expiry(); +} + } // namespace net diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc index ad27e23..edbc654 100644 --- a/net/base/x509_certificate_mac.cc +++ b/net/base/x509_certificate_mac.cc @@ -252,11 +252,6 @@ void X509Certificate::Persist(Pickle* pickle) { pickle->WriteData(reinterpret_cast<char*>(cert_data.Data), cert_data.Length); } -bool X509Certificate::HasExpired() const { - NOTIMPLEMENTED(); - return false; -} - void X509Certificate::GetDNSNames(std::vector<std::string>* dns_names) const { dns_names->clear(); diff --git a/net/base/x509_certificate_nss.cc b/net/base/x509_certificate_nss.cc index 754ed1f..733483a 100644 --- a/net/base/x509_certificate_nss.cc +++ b/net/base/x509_certificate_nss.cc @@ -365,11 +365,6 @@ void X509Certificate::GetDNSNames(std::vector<std::string>* dns_names) const { dns_names->push_back(subject_.common_name); } -bool X509Certificate::HasExpired() const { - NOTIMPLEMENTED(); - return false; -} - // TODO(ukai): fix to use this method to verify certificate on SSL channel. // Note that it's not being used yet. We need to fix SSLClientSocketNSS to // use this method to verify ssl certificate. diff --git a/net/base/x509_certificate_win.cc b/net/base/x509_certificate_win.cc index 1fe23f2..bae5607 100644 --- a/net/base/x509_certificate_win.cc +++ b/net/base/x509_certificate_win.cc @@ -427,10 +427,6 @@ void X509Certificate::GetDNSNames(std::vector<std::string>* dns_names) const { dns_names->push_back(subject_.common_name); } -bool X509Certificate::HasExpired() const { - return Time::Now() > valid_expiry(); -} - int X509Certificate::Verify(const std::string& hostname, bool rev_checking_enabled, CertVerifyResult* verify_result) const { |