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 |
412 void X509Certificate::GetSubjectAltName( | 423 void X509Certificate::GetSubjectAltName( |
413 std::vector<std::string>* dns_names, | 424 std::vector<std::string>* dns_names, |
414 std::vector<std::string>* ip_addrs) const { | 425 std::vector<std::string>* ip_addrs) const { |
415 if (dns_names) | 426 if (dns_names) |
416 dns_names->clear(); | 427 dns_names->clear(); |
417 if (ip_addrs) | 428 if (ip_addrs) |
418 ip_addrs->clear(); | 429 ip_addrs->clear(); |
419 | 430 |
420 ParseSubjectAltName(cert_handle_, dns_names, ip_addrs); | 431 ParseSubjectAltName(cert_handle_, dns_names, ip_addrs); |
421 } | 432 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 DERCache der_cache; | 564 DERCache der_cache; |
554 if (!GetDERAndCacheIfNeeded(cert_handle, &der_cache)) | 565 if (!GetDERAndCacheIfNeeded(cert_handle, &der_cache)) |
555 return false; | 566 return false; |
556 | 567 |
557 return pickle->WriteData( | 568 return pickle->WriteData( |
558 reinterpret_cast<const char*>(der_cache.data), | 569 reinterpret_cast<const char*>(der_cache.data), |
559 der_cache.data_length); | 570 der_cache.data_length); |
560 } | 571 } |
561 | 572 |
562 } // namespace net | 573 } // namespace net |
OLD | NEW |