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 <openssl/digest.h> | 7 #include <openssl/digest.h> |
8 #include <openssl/evp.h> | 8 #include <openssl/evp.h> |
9 #include <openssl/rsa.h> | 9 #include <openssl/rsa.h> |
10 #include <openssl/x509.h> | 10 #include <openssl/x509.h> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "crypto/openssl_util.h" | 16 #include "crypto/openssl_util.h" |
17 #include "crypto/scoped_openssl_types.h" | 17 #include "crypto/scoped_openssl_types.h" |
18 #include "extensions/browser/api/cast_channel/cast_auth_ica.h" | 18 #include "extensions/browser/api/cast_channel/cast_auth_ica.h" |
19 #include "net/cert/x509_certificate.h" | 19 #include "net/cert/x509_certificate.h" |
20 #include "net/cert/x509_util_openssl.h" | 20 #include "net/cert/x509_util_openssl.h" |
21 #include "net/ssl/scoped_openssl_types.h" | 21 #include "net/ssl/scoped_openssl_types.h" |
22 | 22 |
23 namespace extensions { | 23 namespace extensions { |
24 namespace core_api { | 24 namespace api { |
25 namespace cast_crypto { | 25 namespace cast_crypto { |
26 namespace { | 26 namespace { |
27 | 27 |
28 class CertVerificationContextOpenSSL : public CertVerificationContext { | 28 class CertVerificationContextOpenSSL : public CertVerificationContext { |
29 public: | 29 public: |
30 // Takes ownership of the passed-in x509 object | 30 // Takes ownership of the passed-in x509 object |
31 explicit CertVerificationContextOpenSSL(X509* x509) : x509_(x509) {} | 31 explicit CertVerificationContextOpenSSL(X509* x509) : x509_(x509) {} |
32 | 32 |
33 VerificationResult VerifySignatureOverData( | 33 VerificationResult VerifySignatureOverData( |
34 const base::StringPiece& signature, | 34 const base::StringPiece& signature, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 | 148 |
149 return VerificationResult(); | 149 return VerificationResult(); |
150 } | 150 } |
151 | 151 |
152 std::string VerificationResult::GetLogString() const { | 152 std::string VerificationResult::GetLogString() const { |
153 return error_message; | 153 return error_message; |
154 } | 154 } |
155 | 155 |
156 } // namespace cast_crypto | 156 } // namespace cast_crypto |
157 } // namespace core_api | 157 } // namespace api |
158 } // namespace extensions | 158 } // namespace extensions |
OLD | NEW |