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 // OpenSSL binding for SSLClientSocket. The class layout and general principle | 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle |
6 // of operation is derived from SSLClientSocketNSS. | 6 // of operation is derived from SSLClientSocketNSS. |
7 | 7 |
8 #include "net/socket/ssl_client_socket_openssl.h" | 8 #include "net/socket/ssl_client_socket_openssl.h" |
9 | 9 |
10 #include <errno.h> | 10 #include <errno.h> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const char kDefaultSupportedNPNProtocol[] = "http/1.1"; | 80 const char kDefaultSupportedNPNProtocol[] = "http/1.1"; |
81 | 81 |
82 // Default size of the internal BoringSSL buffers. | 82 // Default size of the internal BoringSSL buffers. |
83 const int KDefaultOpenSSLBufferSize = 17 * 1024; | 83 const int KDefaultOpenSSLBufferSize = 17 * 1024; |
84 | 84 |
85 // TLS extension number use for Token Binding. | 85 // TLS extension number use for Token Binding. |
86 const unsigned int kTbExtNum = 30033; | 86 const unsigned int kTbExtNum = 30033; |
87 | 87 |
88 // Token Binding ProtocolVersions supported. | 88 // Token Binding ProtocolVersions supported. |
89 const uint8_t kTbProtocolVersionMajor = 0; | 89 const uint8_t kTbProtocolVersionMajor = 0; |
90 const uint8_t kTbProtocolVersionMinor = 3; | 90 const uint8_t kTbProtocolVersionMinor = 4; |
91 const uint8_t kTbMinProtocolVersionMajor = 0; | 91 const uint8_t kTbMinProtocolVersionMajor = 0; |
92 const uint8_t kTbMinProtocolVersionMinor = 2; | 92 const uint8_t kTbMinProtocolVersionMinor = 3; |
93 | 93 |
94 void FreeX509Stack(STACK_OF(X509)* ptr) { | 94 void FreeX509Stack(STACK_OF(X509)* ptr) { |
95 sk_X509_pop_free(ptr, X509_free); | 95 sk_X509_pop_free(ptr, X509_free); |
96 } | 96 } |
97 | 97 |
98 using ScopedX509Stack = crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack>; | 98 using ScopedX509Stack = crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack>; |
99 | 99 |
100 // Used for encoding the |connection_status| field of an SSLInfo object. | 100 // Used for encoding the |connection_status| field of an SSLInfo object. |
101 int EncodeSSLConnectionStatus(uint16_t cipher_suite, | 101 int EncodeSSLConnectionStatus(uint16_t cipher_suite, |
102 int compression, | 102 int compression, |
(...skipping 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2330 tb_was_negotiated_ = true; | 2330 tb_was_negotiated_ = true; |
2331 return 1; | 2331 return 1; |
2332 } | 2332 } |
2333 } | 2333 } |
2334 | 2334 |
2335 *out_alert_value = SSL_AD_ILLEGAL_PARAMETER; | 2335 *out_alert_value = SSL_AD_ILLEGAL_PARAMETER; |
2336 return 0; | 2336 return 0; |
2337 } | 2337 } |
2338 | 2338 |
2339 } // namespace net | 2339 } // namespace net |
OLD | NEW |