OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/x509_certificate.h" | 5 #include "net/base/x509_certificate.h" |
6 | 6 |
7 #include <openssl/asn1.h> | 7 #include <openssl/asn1.h> |
8 #include <openssl/crypto.h> | 8 #include <openssl/crypto.h> |
9 #include <openssl/obj_mac.h> | 9 #include <openssl/obj_mac.h> |
10 #include <openssl/pem.h> | 10 #include <openssl/pem.h> |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 X509Certificate* X509Certificate::CreateSelfSigned( | 402 X509Certificate* X509Certificate::CreateSelfSigned( |
403 crypto::RSAPrivateKey* key, | 403 crypto::RSAPrivateKey* key, |
404 const std::string& subject, | 404 const std::string& subject, |
405 uint32 serial_number, | 405 uint32 serial_number, |
406 base::TimeDelta valid_duration) { | 406 base::TimeDelta valid_duration) { |
407 // TODO(port): Implement. See http://crbug.com/91512. | 407 // TODO(port): Implement. See http://crbug.com/91512. |
408 NOTIMPLEMENTED(); | 408 NOTIMPLEMENTED(); |
409 return NULL; | 409 return NULL; |
410 } | 410 } |
411 | 411 |
412 // static | |
413 X509Certificate* X509Certificate::CreateOriginBound( | |
414 crypto::RSAPrivateKey* key, | |
415 const std::string& origin, | |
416 uint32 serial_number, | |
417 base::TimeDelta valid_duration) { | |
418 // TODO(port): Implement. | |
419 NOTIMPLEMENTED(); | |
420 return NULL; | |
421 } | |
422 | |
423 void X509Certificate::GetSubjectAltName( | 412 void X509Certificate::GetSubjectAltName( |
424 std::vector<std::string>* dns_names, | 413 std::vector<std::string>* dns_names, |
425 std::vector<std::string>* ip_addrs) const { | 414 std::vector<std::string>* ip_addrs) const { |
426 if (dns_names) | 415 if (dns_names) |
427 dns_names->clear(); | 416 dns_names->clear(); |
428 if (ip_addrs) | 417 if (ip_addrs) |
429 ip_addrs->clear(); | 418 ip_addrs->clear(); |
430 | 419 |
431 ParseSubjectAltName(cert_handle_, dns_names, ip_addrs); | 420 ParseSubjectAltName(cert_handle_, dns_names, ip_addrs); |
432 } | 421 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 DERCache der_cache; | 553 DERCache der_cache; |
565 if (!GetDERAndCacheIfNeeded(cert_handle, &der_cache)) | 554 if (!GetDERAndCacheIfNeeded(cert_handle, &der_cache)) |
566 return false; | 555 return false; |
567 | 556 |
568 return pickle->WriteData( | 557 return pickle->WriteData( |
569 reinterpret_cast<const char*>(der_cache.data), | 558 reinterpret_cast<const char*>(der_cache.data), |
570 der_cache.data_length); | 559 der_cache.data_length); |
571 } | 560 } |
572 | 561 |
573 } // namespace net | 562 } // namespace net |
OLD | NEW |