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/crypto/quic_crypto_client_config.h" | 5 #include "net/quic/crypto/quic_crypto_client_config.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "net/quic/crypto/cert_compressor.h" | 9 #include "net/quic/crypto/cert_compressor.h" |
10 #include "net/quic/crypto/chacha20_poly1305_encrypter.h" | 10 #include "net/quic/crypto/chacha20_poly1305_encrypter.h" |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
580 *error_details = "Certificate missing"; | 580 *error_details = "Certificate missing"; |
581 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER; | 581 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER; |
582 } | 582 } |
583 | 583 |
584 if (!has_proof && has_cert) { | 584 if (!has_proof && has_cert) { |
585 *error_details = "Proof missing"; | 585 *error_details = "Proof missing"; |
586 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER; | 586 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER; |
587 } | 587 } |
588 } | 588 } |
589 | 589 |
590 const QuicTag* reject_reason_tags; | |
wtc
2014/06/19 00:13:24
Nit: name this variable |reject_reasons| because s
ramant (doing other things)
2014/06/19 01:57:34
Done.
| |
591 size_t num_reject_reasons; | |
592 if (rej.GetTaglist(kRejectReason, &reject_reason_tags, | |
593 &num_reject_reasons) == QUIC_NO_ERROR) { | |
594 #ifndef NDEBUG | |
wtc
2014/06/19 00:13:24
Nit: use
#if defined(DEBUG)
or
#if !defined(ND
ramant (doing other things)
2014/06/19 01:57:34
Done.
| |
595 for (size_t i = 0; i < num_reject_reasons; ++i) { | |
596 DVLOG(1) << "Reason for rejection: " << reject_reason_tags[i]; | |
wtc
2014/06/19 00:13:24
Nit: Reason => Reasons
ramant (doing other things)
2014/06/19 01:57:34
Done.
| |
597 } | |
598 #endif | |
599 } | |
600 | |
590 return QUIC_NO_ERROR; | 601 return QUIC_NO_ERROR; |
591 } | 602 } |
592 | 603 |
593 QuicErrorCode QuicCryptoClientConfig::ProcessServerHello( | 604 QuicErrorCode QuicCryptoClientConfig::ProcessServerHello( |
594 const CryptoHandshakeMessage& server_hello, | 605 const CryptoHandshakeMessage& server_hello, |
595 QuicConnectionId connection_id, | 606 QuicConnectionId connection_id, |
596 const QuicVersionVector& negotiated_versions, | 607 const QuicVersionVector& negotiated_versions, |
597 CachedState* cached, | 608 CachedState* cached, |
598 QuicCryptoNegotiatedParameters* out_params, | 609 QuicCryptoNegotiatedParameters* out_params, |
599 string* error_details) { | 610 string* error_details) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
744 return; | 755 return; |
745 } | 756 } |
746 | 757 |
747 // Update canonical version to point at the "most recent" entry. | 758 // Update canonical version to point at the "most recent" entry. |
748 canonical_server_map_[suffix_server_id] = server_id; | 759 canonical_server_map_[suffix_server_id] = server_id; |
749 | 760 |
750 server_state->InitializeFrom(*canonical_state); | 761 server_state->InitializeFrom(*canonical_state); |
751 } | 762 } |
752 | 763 |
753 } // namespace net | 764 } // namespace net |
OLD | NEW |