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 #include "net/quic/core/crypto/quic_crypto_server_config.h" | 5 #include "net/quic/core/crypto/quic_crypto_server_config.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 } | 622 } |
623 DCHECK(proof_source_.get()); | 623 DCHECK(proof_source_.get()); |
624 string chlo_hash; | 624 string chlo_hash; |
625 CryptoUtils::HashHandshakeMessage(client_hello, &chlo_hash); | 625 CryptoUtils::HashHandshakeMessage(client_hello, &chlo_hash); |
626 // No need to get a new proof if one was already generated. | 626 // No need to get a new proof if one was already generated. |
627 if (!crypto_proof->chain && | 627 if (!crypto_proof->chain && |
628 !proof_source_->GetProof(server_ip, info.sni.as_string(), | 628 !proof_source_->GetProof(server_ip, info.sni.as_string(), |
629 primary_config->serialized, version, chlo_hash, | 629 primary_config->serialized, version, chlo_hash, |
630 &crypto_proof->chain, &crypto_proof->signature, | 630 &crypto_proof->chain, &crypto_proof->signature, |
631 &crypto_proof->cert_sct)) { | 631 &crypto_proof->cert_sct)) { |
| 632 *error_details = "Missing or invalid crypto proof."; |
632 return QUIC_HANDSHAKE_FAILED; | 633 return QUIC_HANDSHAKE_FAILED; |
633 } | 634 } |
634 | 635 |
635 StringPiece cert_sct; | 636 StringPiece cert_sct; |
636 if (client_hello.GetStringPiece(kCertificateSCTTag, &cert_sct) && | 637 if (client_hello.GetStringPiece(kCertificateSCTTag, &cert_sct) && |
637 cert_sct.empty()) { | 638 cert_sct.empty()) { |
638 params->sct_supported_by_client = true; | 639 params->sct_supported_by_client = true; |
639 } | 640 } |
640 | 641 |
641 if (!info.reject_reasons.empty() || !requested_config.get()) { | 642 if (!info.reject_reasons.empty() || !requested_config.get()) { |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 priority(0), | 2072 priority(0), |
2072 source_address_token_boxer(nullptr) {} | 2073 source_address_token_boxer(nullptr) {} |
2073 | 2074 |
2074 QuicCryptoServerConfig::Config::~Config() { | 2075 QuicCryptoServerConfig::Config::~Config() { |
2075 base::STLDeleteElements(&key_exchanges); | 2076 base::STLDeleteElements(&key_exchanges); |
2076 } | 2077 } |
2077 | 2078 |
2078 QuicCryptoProof::QuicCryptoProof() {} | 2079 QuicCryptoProof::QuicCryptoProof() {} |
2079 QuicCryptoProof::~QuicCryptoProof() {} | 2080 QuicCryptoProof::~QuicCryptoProof() {} |
2080 } // namespace net | 2081 } // namespace net |
OLD | NEW |