summaryrefslogtreecommitdiffstats
path: root/net/base/x509_certificate_nss.cc
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-14 22:36:35 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-14 22:36:35 +0000
commit1b1a264ad3d0ecf0e0e19468b3e4b9e1553c2e88 (patch)
treec3617b3e5e0590ed2f01096929ddbb0edac000e2 /net/base/x509_certificate_nss.cc
parent7105ea549a113d4c1d473c305475caa0a866e286 (diff)
downloadchromium_src-1b1a264ad3d0ecf0e0e19468b3e4b9e1553c2e88.zip
chromium_src-1b1a264ad3d0ecf0e0e19468b3e4b9e1553c2e88.tar.gz
chromium_src-1b1a264ad3d0ecf0e0e19468b3e4b9e1553c2e88.tar.bz2
Linux: Add Certificate Info dialog (part 1)
Rename base/nss_init.{h,cc} to base/nss_util.{h,cc}, move PRTimeToBaseTime there. BUG=18119 TEST=Load https://www.google.com, compare to firefox cert dialog. Review URL: http://codereview.chromium.org/500141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate_nss.cc')
-rw-r--r--net/base/x509_certificate_nss.cc22
1 files changed, 2 insertions, 20 deletions
diff --git a/net/base/x509_certificate_nss.cc b/net/base/x509_certificate_nss.cc
index 5f7075e..f7dbd71 100644
--- a/net/base/x509_certificate_nss.cc
+++ b/net/base/x509_certificate_nss.cc
@@ -16,7 +16,7 @@
#include "base/logging.h"
#include "base/pickle.h"
#include "base/time.h"
-#include "base/nss_init.h"
+#include "base/nss_util.h"
#include "net/base/cert_status_flags.h"
#include "net/base/cert_verify_result.h"
#include "net/base/ev_root_ca_metadata.h"
@@ -211,24 +211,6 @@ void GetCertChainInfo(CERTCertList* cert_list,
}
}
-// TODO(port): Implement this more simply, and put it in the right place
-base::Time PRTimeToBaseTime(PRTime prtime) {
- PRExplodedTime prxtime;
- PR_ExplodeTime(prtime, PR_GMTParameters, &prxtime);
-
- base::Time::Exploded exploded;
- exploded.year = prxtime.tm_year;
- exploded.month = prxtime.tm_month + 1;
- exploded.day_of_week = prxtime.tm_wday;
- exploded.day_of_month = prxtime.tm_mday;
- exploded.hour = prxtime.tm_hour;
- exploded.minute = prxtime.tm_min;
- exploded.second = prxtime.tm_sec;
- exploded.millisecond = prxtime.tm_usec / 1000;
-
- return base::Time::FromUTCExploded(exploded);
-}
-
typedef char* (*CERTGetNameFunc)(CERTName* name);
void ParsePrincipal(CERTName* name,
@@ -292,7 +274,7 @@ void ParseDate(SECItem* der_date, base::Time* result) {
PRTime prtime;
SECStatus rv = DER_DecodeTimeChoice(&prtime, der_date);
DCHECK(rv == SECSuccess);
- *result = PRTimeToBaseTime(prtime);
+ *result = base::PRTimeToBaseTime(prtime);
}
void GetCertSubjectAltNamesOfType(X509Certificate::OSCertHandle cert_handle,