Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: net/socket/ssl_client_socket_openssl.cc

Issue 1636453004: Update Token Binding code to match latest draft draft-ietf-tokbind-protocol-04 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/ssl/token_binding.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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;
davidben 2016/01/28 18:27:55 Where did these numbers come from? I don't see the
nharper 2016/01/28 19:06:07 This comes from draft-ietf-tokbind-negotiation-02,
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
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
OLDNEW
« no previous file with comments | « no previous file | net/ssl/token_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698