Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1568)

Unified Diff: net/cert/x509_certificate_nss.cc

Issue 17265013: Remove platform-specific implementations of RSAPrivateKey and SignatureCreator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix colliding serial numbers Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/x509_certificate_mac.cc ('k') | net/cert/x509_certificate_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_certificate_nss.cc
diff --git a/net/cert/x509_certificate_nss.cc b/net/cert/x509_certificate_nss.cc
index bbc448f20a64a11e1712aeaeff12fb6d97def889..8448a49dd23159d871de9e7e24890c2a3b409e4f 100644
--- a/net/cert/x509_certificate_nss.cc
+++ b/net/cert/x509_certificate_nss.cc
@@ -20,7 +20,6 @@
#include "base/strings/stringprintf.h"
#include "base/time.h"
#include "crypto/nss_util.h"
-#include "crypto/rsa_private_key.h"
#include "crypto/scoped_nss_types.h"
#include "net/cert/x509_util_nss.h"
@@ -114,30 +113,6 @@ std::string X509Certificate::GetDefaultNickname(CertType type) const {
return result;
}
-// static
-X509Certificate* X509Certificate::CreateSelfSigned(
- crypto::RSAPrivateKey* key,
- const std::string& subject,
- uint32 serial_number,
- base::TimeDelta valid_duration) {
- DCHECK(key);
- base::Time not_valid_before = base::Time::Now();
- base::Time not_valid_after = not_valid_before + valid_duration;
- CERTCertificate* cert = x509_util::CreateSelfSignedCert(key->public_key(),
- key->key(),
- subject,
- serial_number,
- not_valid_before,
- not_valid_after);
- if (!cert)
- return NULL;
-
- X509Certificate* x509_cert = X509Certificate::CreateFromHandle(
- cert, X509Certificate::OSCertHandles());
- CERT_DestroyCertificate(cert);
- return x509_cert;
-}
-
void X509Certificate::GetSubjectAltName(
std::vector<std::string>* dns_names,
std::vector<std::string>* ip_addrs) const {
« no previous file with comments | « net/cert/x509_certificate_mac.cc ('k') | net/cert/x509_certificate_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698