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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 421 |
422 // static | 422 // static |
423 X509_STORE* X509Certificate::cert_store() { | 423 X509_STORE* X509Certificate::cert_store() { |
424 return X509InitSingleton::GetInstance()->store(); | 424 return X509InitSingleton::GetInstance()->store(); |
425 } | 425 } |
426 | 426 |
427 #if !defined(OS_ANDROID) | 427 #if !defined(OS_ANDROID) |
428 | 428 |
429 int X509Certificate::VerifyInternal(const std::string& hostname, | 429 int X509Certificate::VerifyInternal(const std::string& hostname, |
430 int flags, | 430 int flags, |
| 431 CRLSet* crl_set, |
431 CertVerifyResult* verify_result) const { | 432 CertVerifyResult* verify_result) const { |
432 if (!VerifyNameMatch(hostname)) | 433 if (!VerifyNameMatch(hostname)) |
433 verify_result->cert_status |= CERT_STATUS_COMMON_NAME_INVALID; | 434 verify_result->cert_status |= CERT_STATUS_COMMON_NAME_INVALID; |
434 | 435 |
435 crypto::ScopedOpenSSL<X509_STORE_CTX, X509_STORE_CTX_free> ctx( | 436 crypto::ScopedOpenSSL<X509_STORE_CTX, X509_STORE_CTX_free> ctx( |
436 X509_STORE_CTX_new()); | 437 X509_STORE_CTX_new()); |
437 | 438 |
438 crypto::ScopedOpenSSL<STACK_OF(X509), sk_X509_free_fn> intermediates( | 439 crypto::ScopedOpenSSL<STACK_OF(X509), sk_X509_free_fn> intermediates( |
439 sk_X509_new_null()); | 440 sk_X509_new_null()); |
440 if (!intermediates.get()) | 441 if (!intermediates.get()) |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 DERCache der_cache; | 553 DERCache der_cache; |
553 if (!GetDERAndCacheIfNeeded(cert_handle, &der_cache)) | 554 if (!GetDERAndCacheIfNeeded(cert_handle, &der_cache)) |
554 return false; | 555 return false; |
555 | 556 |
556 return pickle->WriteData( | 557 return pickle->WriteData( |
557 reinterpret_cast<const char*>(der_cache.data), | 558 reinterpret_cast<const char*>(der_cache.data), |
558 der_cache.data_length); | 559 der_cache.data_length); |
559 } | 560 } |
560 | 561 |
561 } // namespace net | 562 } // namespace net |
OLD | NEW |