| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromium/quic_chromium_client_session.h" | 5 #include "net/quic/chromium/quic_chromium_client_session.h" |
| 6 | 6 |
| 7 #include <openssl/ssl.h> | 7 #include <openssl/ssl.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 // we learn about SSL info (sync vs async vs cached). | 532 // we learn about SSL info (sync vs async vs cached). |
| 533 bool QuicChromiumClientSession::GetSSLInfo(SSLInfo* ssl_info) const { | 533 bool QuicChromiumClientSession::GetSSLInfo(SSLInfo* ssl_info) const { |
| 534 ssl_info->Reset(); | 534 ssl_info->Reset(); |
| 535 if (!cert_verify_result_) { | 535 if (!cert_verify_result_) { |
| 536 return false; | 536 return false; |
| 537 } | 537 } |
| 538 | 538 |
| 539 ssl_info->cert_status = cert_verify_result_->cert_status; | 539 ssl_info->cert_status = cert_verify_result_->cert_status; |
| 540 ssl_info->cert = cert_verify_result_->verified_cert; | 540 ssl_info->cert = cert_verify_result_->verified_cert; |
| 541 | 541 |
| 542 // TODO(davidben): Switch these to the TLS 1.3 AEAD-only ciphers. That will | 542 // TODO(wtc): Define QUIC "cipher suites". |
| 543 // place them in the cache in the default configuration, so do this when we | 543 // Report the TLS cipher suite that most closely resembles the crypto |
| 544 // are comfortable supporting those values long-term. | 544 // parameters of the QUIC connection. |
| 545 QuicTag aead = crypto_stream_->crypto_negotiated_params().aead; | 545 QuicTag aead = crypto_stream_->crypto_negotiated_params().aead; |
| 546 uint16_t cipher_suite; | 546 uint16_t cipher_suite; |
| 547 int security_bits; | 547 int security_bits; |
| 548 switch (aead) { | 548 switch (aead) { |
| 549 case kAESG: | 549 case kAESG: |
| 550 cipher_suite = 0xc02f; // TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | 550 cipher_suite = 0xc02f; // TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 |
| 551 security_bits = 128; | 551 security_bits = 128; |
| 552 break; | 552 break; |
| 553 case kCC20: | 553 case kCC20: |
| 554 cipher_suite = 0xcc13; // TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 | 554 cipher_suite = 0xcc13; // TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 } | 1409 } |
| 1410 | 1410 |
| 1411 const LoadTimingInfo::ConnectTiming& | 1411 const LoadTimingInfo::ConnectTiming& |
| 1412 QuicChromiumClientSession::GetConnectTiming() { | 1412 QuicChromiumClientSession::GetConnectTiming() { |
| 1413 connect_timing_.ssl_start = connect_timing_.connect_start; | 1413 connect_timing_.ssl_start = connect_timing_.connect_start; |
| 1414 connect_timing_.ssl_end = connect_timing_.connect_end; | 1414 connect_timing_.ssl_end = connect_timing_.connect_end; |
| 1415 return connect_timing_; | 1415 return connect_timing_; |
| 1416 } | 1416 } |
| 1417 | 1417 |
| 1418 } // namespace net | 1418 } // namespace net |
| OLD | NEW |