| OLD | NEW |
| 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 <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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 } | 355 } |
| 356 default: { | 356 default: { |
| 357 NOTREACHED() << "Certificate format " << format << " unimplemented"; | 357 NOTREACHED() << "Certificate format " << format << " unimplemented"; |
| 358 break; | 358 break; |
| 359 } | 359 } |
| 360 } | 360 } |
| 361 | 361 |
| 362 return results; | 362 return results; |
| 363 } | 363 } |
| 364 | 364 |
| 365 // static | |
| 366 X509Certificate* X509Certificate::CreateSelfSigned( | |
| 367 crypto::RSAPrivateKey* key, | |
| 368 const std::string& subject, | |
| 369 uint32 serial_number, | |
| 370 base::TimeDelta valid_duration) { | |
| 371 // TODO(port): Implement. See http://crbug.com/91512. | |
| 372 NOTIMPLEMENTED(); | |
| 373 return NULL; | |
| 374 } | |
| 375 | |
| 376 void X509Certificate::GetSubjectAltName( | 365 void X509Certificate::GetSubjectAltName( |
| 377 std::vector<std::string>* dns_names, | 366 std::vector<std::string>* dns_names, |
| 378 std::vector<std::string>* ip_addrs) const { | 367 std::vector<std::string>* ip_addrs) const { |
| 379 if (dns_names) | 368 if (dns_names) |
| 380 dns_names->clear(); | 369 dns_names->clear(); |
| 381 if (ip_addrs) | 370 if (ip_addrs) |
| 382 ip_addrs->clear(); | 371 ip_addrs->clear(); |
| 383 | 372 |
| 384 ParseSubjectAltName(cert_handle_, dns_names, ip_addrs); | 373 ParseSubjectAltName(cert_handle_, dns_names, ip_addrs); |
| 385 } | 374 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 if (X509_NAME_cmp(issuer, cert_names[n]) == 0) { | 511 if (X509_NAME_cmp(issuer, cert_names[n]) == 0) { |
| 523 return true; | 512 return true; |
| 524 } | 513 } |
| 525 } | 514 } |
| 526 } | 515 } |
| 527 | 516 |
| 528 return false; | 517 return false; |
| 529 } | 518 } |
| 530 | 519 |
| 531 } // namespace net | 520 } // namespace net |
| OLD | NEW |