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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const int kNoPendingResult = 1; | 76 const int kNoPendingResult = 1; |
77 | 77 |
78 // If a client doesn't have a list of protocols that it supports, but | 78 // If a client doesn't have a list of protocols that it supports, but |
79 // the server supports NPN, choosing "http/1.1" is the best answer. | 79 // the server supports NPN, choosing "http/1.1" is the best answer. |
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 = 24; |
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 = 4; | 90 const uint8_t kTbProtocolVersionMinor = 4; |
91 const uint8_t kTbMinProtocolVersionMajor = 0; | 91 const uint8_t kTbMinProtocolVersionMajor = 0; |
92 const uint8_t kTbMinProtocolVersionMinor = 3; | 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 } |
(...skipping 2233 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 |