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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 2337253004: Update Token Binding code to the latest drafts (Closed)
Patch Set: Add call to CBS_len() Created 4 years, 3 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 | « net/spdy/spdy_session.h ('k') | 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 #include "net/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 } 1929 }
1930 1930
1931 bool SpdySession::WasNpnNegotiated() const { 1931 bool SpdySession::WasNpnNegotiated() const {
1932 return connection_->socket()->WasNpnNegotiated(); 1932 return connection_->socket()->WasNpnNegotiated();
1933 } 1933 }
1934 1934
1935 NextProto SpdySession::GetNegotiatedProtocol() const { 1935 NextProto SpdySession::GetNegotiatedProtocol() const {
1936 return connection_->socket()->GetNegotiatedProtocol(); 1936 return connection_->socket()->GetNegotiatedProtocol();
1937 } 1937 }
1938 1938
1939 Error SpdySession::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, 1939 Error SpdySession::GetTokenBindingSignature(crypto::ECPrivateKey* key,
1940 std::vector<uint8_t>* out) { 1940 TokenBindingType tb_type,
1941 std::vector<uint8_t>* out) {
1941 if (!is_secure_) { 1942 if (!is_secure_) {
1942 NOTREACHED(); 1943 NOTREACHED();
1943 return ERR_FAILED; 1944 return ERR_FAILED;
1944 } 1945 }
1945 SSLClientSocket* ssl_socket = 1946 SSLClientSocket* ssl_socket =
1946 static_cast<SSLClientSocket*>(connection_->socket()); 1947 static_cast<SSLClientSocket*>(connection_->socket());
1947 return ssl_socket->GetSignedEKMForTokenBinding(key, out); 1948 return ssl_socket->GetTokenBindingSignature(key, tb_type, out);
1948 } 1949 }
1949 1950
1950 void SpdySession::OnError(SpdyFramer::SpdyError error_code) { 1951 void SpdySession::OnError(SpdyFramer::SpdyError error_code) {
1951 CHECK(in_io_loop_); 1952 CHECK(in_io_loop_);
1952 1953
1953 RecordProtocolErrorHistogram(MapFramerErrorToProtocolError(error_code)); 1954 RecordProtocolErrorHistogram(MapFramerErrorToProtocolError(error_code));
1954 std::string description = 1955 std::string description =
1955 base::StringPrintf("Framer error: %d (%s).", 1956 base::StringPrintf("Framer error: %d (%s).",
1956 error_code, 1957 error_code,
1957 SpdyFramer::ErrorCodeToString(error_code)); 1958 SpdyFramer::ErrorCodeToString(error_code));
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3140 if (!queue->empty()) { 3141 if (!queue->empty()) {
3141 SpdyStreamId stream_id = queue->front(); 3142 SpdyStreamId stream_id = queue->front();
3142 queue->pop_front(); 3143 queue->pop_front();
3143 return stream_id; 3144 return stream_id;
3144 } 3145 }
3145 } 3146 }
3146 return 0; 3147 return 0;
3147 } 3148 }
3148 3149
3149 } // namespace net 3150 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/ssl/token_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698