| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef NET_QUIC_CHROMIUM_CRYPTO_PROOF_SOURCE_CHROMIUM_H_ | 5 #ifndef NET_QUIC_CHROMIUM_CRYPTO_PROOF_SOURCE_CHROMIUM_H_ |
| 6 #define NET_QUIC_CHROMIUM_CRYPTO_PROOF_SOURCE_CHROMIUM_H_ | 6 #define NET_QUIC_CHROMIUM_CRYPTO_PROOF_SOURCE_CHROMIUM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 ~ProofSourceChromium() override; | 26 ~ProofSourceChromium() override; |
| 27 | 27 |
| 28 // Initializes this object based on the certificate chain in |cert_path|, | 28 // Initializes this object based on the certificate chain in |cert_path|, |
| 29 // and the PKCS#8 RSA private key in |key_path|. Signed certificate | 29 // and the PKCS#8 RSA private key in |key_path|. Signed certificate |
| 30 // timestamp may be loaded from |sct_path| if it is non-empty. | 30 // timestamp may be loaded from |sct_path| if it is non-empty. |
| 31 bool Initialize(const base::FilePath& cert_path, | 31 bool Initialize(const base::FilePath& cert_path, |
| 32 const base::FilePath& key_path, | 32 const base::FilePath& key_path, |
| 33 const base::FilePath& sct_path); | 33 const base::FilePath& sct_path); |
| 34 | 34 |
| 35 // ProofSource interface | 35 // ProofSource interface |
| 36 bool GetProof(const QuicSocketAddress& server_ip, | |
| 37 const std::string& hostname, | |
| 38 const std::string& server_config, | |
| 39 QuicVersion quic_version, | |
| 40 base::StringPiece chlo_hash, | |
| 41 const QuicTagVector& connection_options, | |
| 42 QuicReferenceCountedPointer<ProofSource::Chain>* out_chain, | |
| 43 QuicCryptoProof* proof) override; | |
| 44 | |
| 45 void GetProof(const QuicSocketAddress& server_ip, | 36 void GetProof(const QuicSocketAddress& server_ip, |
| 46 const std::string& hostname, | 37 const std::string& hostname, |
| 47 const std::string& server_config, | 38 const std::string& server_config, |
| 48 QuicVersion quic_version, | 39 QuicVersion quic_version, |
| 49 base::StringPiece chlo_hash, | 40 base::StringPiece chlo_hash, |
| 50 const QuicTagVector& connection_options, | 41 const QuicTagVector& connection_options, |
| 51 std::unique_ptr<Callback> callback) override; | 42 std::unique_ptr<Callback> callback) override; |
| 52 | 43 |
| 53 private: | 44 private: |
| 45 bool GetProofInner(const QuicSocketAddress& server_ip, |
| 46 const std::string& hostname, |
| 47 const std::string& server_config, |
| 48 QuicVersion quic_version, |
| 49 base::StringPiece chlo_hash, |
| 50 const QuicTagVector& connection_options, |
| 51 QuicReferenceCountedPointer<ProofSource::Chain>* out_chain, |
| 52 QuicCryptoProof* proof); |
| 53 |
| 54 std::unique_ptr<crypto::RSAPrivateKey> private_key_; | 54 std::unique_ptr<crypto::RSAPrivateKey> private_key_; |
| 55 QuicReferenceCountedPointer<ProofSource::Chain> chain_; | 55 QuicReferenceCountedPointer<ProofSource::Chain> chain_; |
| 56 std::string signed_certificate_timestamp_; | 56 std::string signed_certificate_timestamp_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(ProofSourceChromium); | 58 DISALLOW_COPY_AND_ASSIGN(ProofSourceChromium); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace net | 61 } // namespace net |
| 62 | 62 |
| 63 #endif // NET_QUIC_CHROMIUM_CRYPTO_PROOF_SOURCE_CHROMIUM_H_ | 63 #endif // NET_QUIC_CHROMIUM_CRYPTO_PROOF_SOURCE_CHROMIUM_H_ |
| OLD | NEW |