summaryrefslogtreecommitdiffstats
path: root/net/base/x509_certificate.h
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-19 21:30:21 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-19 21:30:21 +0000
commitfada540a9f88ea6b70d783b29cc55184c94f95f2 (patch)
tree37b79379dcf07448fc62c4ce05ee4c5c31f1e60b /net/base/x509_certificate.h
parent364d3342911aa30c3544fc50e56eab368c823a79 (diff)
downloadchromium_src-fada540a9f88ea6b70d783b29cc55184c94f95f2.zip
chromium_src-fada540a9f88ea6b70d783b29cc55184c94f95f2.tar.gz
chromium_src-fada540a9f88ea6b70d783b29cc55184c94f95f2.tar.bz2
Accidental commit; oops
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate.h')
-rw-r--r--net/base/x509_certificate.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h
index c9f872a..763084b 100644
--- a/net/base/x509_certificate.h
+++ b/net/base/x509_certificate.h
@@ -137,6 +137,7 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
// The issuer of the certificate.
const Principal& issuer() const { return issuer_; }
+#if defined(OS_WIN)
// Time period during which the certificate is valid. More precisely, this
// certificate is invalid before the |valid_start| date and invalid after
// the |valid_expiry| date.
@@ -144,6 +145,12 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
// lacks either date), the date will be null (i.e., is_null() will be true).
const Time& valid_start() const { return valid_start_; }
const Time& valid_expiry() const { return valid_expiry_; }
+#elif defined(OS_MACOSX)
+ // These are used only for some UI, where HasExpired is used to disambiguate a
+ // time error on the certificate as a "too old" or "too young" error. On the
+ // Mac you get different codes for those. There's no easy way of pulling dates
+ // out of the cert short of CSSM, so these remain unimplemented for now.
+#endif
// The fingerprint of this certificate.
const Fingerprint& fingerprint() const { return fingerprint_; }
@@ -154,9 +161,11 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
// Otherwise, it gets the common name in the subject field.
void GetDNSNames(std::vector<std::string>* dns_names) const;
+#if defined(OS_WIN)
// Convenience method that returns whether this certificate has expired as of
// now.
bool HasExpired() const;
+#endif
// Returns true if the certificate is an extended-validation (EV)
// certificate.
@@ -191,11 +200,13 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
// The issuer of the certificate.
Principal issuer_;
+#if defined(OS_WIN)
// This certificate is not valid before |valid_start_|
Time valid_start_;
// This certificate is not valid after |valid_expiry_|
Time valid_expiry_;
+#endif
// The fingerprint of this certificate.
Fingerprint fingerprint_;