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

Side by Side Diff: net/cert/x509_certificate_ios.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/cert/x509_certificate.h ('k') | net/cert/x509_certificate_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/x509_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <Security/Security.h> 8 #include <Security/Security.h>
9 9
10 #include <cert.h> 10 #include <cert.h>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 crypto::ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); 78 crypto::ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE));
79 if (!x509_util::GetIssuersFromEncodedList(valid_issuers, 79 if (!x509_util::GetIssuersFromEncodedList(valid_issuers,
80 arena.get(), 80 arena.get(),
81 &issuers)) { 81 &issuers)) {
82 return false; 82 return false;
83 } 83 }
84 return x509_util::IsCertificateIssuedBy( 84 return x509_util::IsCertificateIssuedBy(
85 nss_chain.cert_chain(), issuers); 85 nss_chain.cert_chain(), issuers);
86 } 86 }
87 87
88 // static
89 X509Certificate* X509Certificate::CreateSelfSigned(
90 crypto::RSAPrivateKey* key,
91 const std::string& subject,
92 uint32 serial_number,
93 base::TimeDelta valid_duration) {
94 DCHECK(key);
95 DCHECK(!subject.empty());
96 NOTIMPLEMENTED();
97 return NULL;
98 }
99
100 void X509Certificate::GetSubjectAltName( 88 void X509Certificate::GetSubjectAltName(
101 std::vector<std::string>* dns_names, 89 std::vector<std::string>* dns_names,
102 std::vector<std::string>* ip_addrs) const { 90 std::vector<std::string>* ip_addrs) const {
103 x509_util_ios::NSSCertificate nss_cert(cert_handle_); 91 x509_util_ios::NSSCertificate nss_cert(cert_handle_);
104 CERTCertificate* cert_handle = nss_cert.cert_handle(); 92 CERTCertificate* cert_handle = nss_cert.cert_handle();
105 if (!cert_handle) { 93 if (!cert_handle) {
106 if (dns_names) 94 if (dns_names)
107 dns_names->clear(); 95 dns_names->clear();
108 if (ip_addrs) 96 if (ip_addrs)
109 ip_addrs->clear(); 97 ip_addrs->clear();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 225
238 // static 226 // static
239 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle, 227 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
240 size_t* size_bits, 228 size_t* size_bits,
241 PublicKeyType* type) { 229 PublicKeyType* type) {
242 x509_util_ios::NSSCertificate nss_cert(cert_handle); 230 x509_util_ios::NSSCertificate nss_cert(cert_handle);
243 x509_util::GetPublicKeyInfo(nss_cert.cert_handle(), size_bits, type); 231 x509_util::GetPublicKeyInfo(nss_cert.cert_handle(), size_bits, type);
244 } 232 }
245 233
246 } // namespace net 234 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate.h ('k') | net/cert/x509_certificate_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698