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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 | 612 |
613 if (validate_chlo_result.error_code != QUIC_NO_ERROR) { | 613 if (validate_chlo_result.error_code != QUIC_NO_ERROR) { |
614 *error_details = validate_chlo_result.error_details; | 614 *error_details = validate_chlo_result.error_details; |
615 return validate_chlo_result.error_code; | 615 return validate_chlo_result.error_code; |
616 } | 616 } |
617 | 617 |
618 out->Clear(); | 618 out->Clear(); |
619 | 619 |
620 if (!ClientDemandsX509Proof(client_hello) && FLAGS_quic_require_x509) { | 620 if (!ClientDemandsX509Proof(client_hello) && FLAGS_quic_require_x509) { |
621 *error_details = "Missing or invalid PDMD"; | 621 *error_details = "Missing or invalid PDMD"; |
622 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER; | 622 return QUIC_UNSUPPORTED_PROOF_DEMAND; |
623 } | 623 } |
624 DCHECK(proof_source_.get()); | 624 DCHECK(proof_source_.get()); |
625 string chlo_hash; | 625 string chlo_hash; |
626 CryptoUtils::HashHandshakeMessage(client_hello, &chlo_hash); | 626 CryptoUtils::HashHandshakeMessage(client_hello, &chlo_hash); |
627 // No need to get a new proof if one was already generated. | 627 // No need to get a new proof if one was already generated. |
628 if (!crypto_proof->chain && | 628 if (!crypto_proof->chain && |
629 !proof_source_->GetProof(server_ip, info.sni.as_string(), | 629 !proof_source_->GetProof(server_ip, info.sni.as_string(), |
630 primary_config->serialized, version, chlo_hash, | 630 primary_config->serialized, version, chlo_hash, |
631 &crypto_proof->chain, &crypto_proof->signature, | 631 &crypto_proof->chain, &crypto_proof->signature, |
632 &crypto_proof->cert_sct)) { | 632 &crypto_proof->cert_sct)) { |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2057 priority(0), | 2057 priority(0), |
2058 source_address_token_boxer(nullptr) {} | 2058 source_address_token_boxer(nullptr) {} |
2059 | 2059 |
2060 QuicCryptoServerConfig::Config::~Config() { | 2060 QuicCryptoServerConfig::Config::~Config() { |
2061 base::STLDeleteElements(&key_exchanges); | 2061 base::STLDeleteElements(&key_exchanges); |
2062 } | 2062 } |
2063 | 2063 |
2064 QuicCryptoProof::QuicCryptoProof() {} | 2064 QuicCryptoProof::QuicCryptoProof() {} |
2065 QuicCryptoProof::~QuicCryptoProof() {} | 2065 QuicCryptoProof::~QuicCryptoProof() {} |
2066 } // namespace net | 2066 } // namespace net |
OLD | NEW |