| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/common/cast/cast_cert_validator.h" | 5 #include "extensions/common/cast/cast_cert_validator.h" |
| 6 | 6 |
| 7 #include <cert.h> | 7 #include <cert.h> |
| 8 #include <cryptohi.h> | 8 #include <cryptohi.h> |
| 9 #include <pk11pub.h> | 9 #include <pk11pub.h> |
| 10 #include <seccomon.h> | 10 #include <seccomon.h> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "crypto/nss_util.h" | 15 #include "crypto/nss_util.h" |
| 16 #include "crypto/scoped_nss_types.h" | 16 #include "crypto/scoped_nss_types.h" |
| 17 #include "extensions/browser/api/cast_channel/cast_auth_ica.h" | 17 #include "extensions/browser/api/cast_channel/cast_auth_ica.h" |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 namespace core_api { | 20 namespace api { |
| 21 namespace cast_crypto { | 21 namespace cast_crypto { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 typedef scoped_ptr< | 25 typedef scoped_ptr< |
| 26 CERTCertificate, | 26 CERTCertificate, |
| 27 crypto::NSSDestroyer<CERTCertificate, CERT_DestroyCertificate>> | 27 crypto::NSSDestroyer<CERTCertificate, CERT_DestroyCertificate>> |
| 28 ScopedCERTCertificate; | 28 ScopedCERTCertificate; |
| 29 | 29 |
| 30 class CertVerificationContextNSS : public CertVerificationContext { | 30 class CertVerificationContextNSS : public CertVerificationContext { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 std::string VerificationResult::GetLogString() const { | 145 std::string VerificationResult::GetLogString() const { |
| 146 std::string nssError = "NSS Error Code: "; | 146 std::string nssError = "NSS Error Code: "; |
| 147 nssError += base::IntToString(library_error_code); | 147 nssError += base::IntToString(library_error_code); |
| 148 return error_message.size() | 148 return error_message.size() |
| 149 ? std::string("Error: ") + error_message + ", " + nssError | 149 ? std::string("Error: ") + error_message + ", " + nssError |
| 150 : nssError; | 150 : nssError; |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace cast_crypto | 153 } // namespace cast_crypto |
| 154 } // namespace core_api | 154 } // namespace api |
| 155 } // namespace extensions | 155 } // namespace extensions |
| OLD | NEW |