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

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

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_http_stream.cc ('k') | net/spdy/spdy_session.cc » ('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 #ifndef NET_SPDY_SPDY_SESSION_H_ 5 #ifndef NET_SPDY_SPDY_SESSION_H_
6 #define NET_SPDY_SPDY_SESSION_H_ 6 #define NET_SPDY_SPDY_SESSION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // Fills SSL info in |ssl_info| and returns true when SSL is in use. 408 // Fills SSL info in |ssl_info| and returns true when SSL is in use.
409 bool GetSSLInfo(SSLInfo* ssl_info) const; 409 bool GetSSLInfo(SSLInfo* ssl_info) const;
410 410
411 // Returns true if ALPN was negotiated for the underlying socket. 411 // Returns true if ALPN was negotiated for the underlying socket.
412 // TODO(bnc): Rename to WasAlpnNegotiated(). 412 // TODO(bnc): Rename to WasAlpnNegotiated().
413 bool WasNpnNegotiated() const; 413 bool WasNpnNegotiated() const;
414 414
415 // Returns the protocol negotiated via ALPN for the underlying socket. 415 // Returns the protocol negotiated via ALPN for the underlying socket.
416 NextProto GetNegotiatedProtocol() const; 416 NextProto GetNegotiatedProtocol() const;
417 417
418 // Signs the EKM value for Token Binding from the TLS layer using |*key| and 418 // Generates the signature used in Token Binding using |*key| and for a Token
419 // puts the result in |*out|. Returns OK or ERR_FAILED. 419 // Binding of type |tb_type|, putting the signature in |*out|. Returns a net
420 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, 420 // error code of OK or ERR_FAILED.
421 std::vector<uint8_t>* out); 421 Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
422 TokenBindingType tb_type,
423 std::vector<uint8_t>* out);
422 424
423 // Send a WINDOW_UPDATE frame for a stream. Called by a stream 425 // Send a WINDOW_UPDATE frame for a stream. Called by a stream
424 // whenever receive window size is increased. 426 // whenever receive window size is increased.
425 void SendStreamWindowUpdate(SpdyStreamId stream_id, 427 void SendStreamWindowUpdate(SpdyStreamId stream_id,
426 uint32_t delta_window_size); 428 uint32_t delta_window_size);
427 429
428 // Accessors for the session's availability state. 430 // Accessors for the session's availability state.
429 bool IsAvailable() const { return availability_state_ == STATE_AVAILABLE; } 431 bool IsAvailable() const { return availability_state_ == STATE_AVAILABLE; }
430 bool IsGoingAway() const { return availability_state_ == STATE_GOING_AWAY; } 432 bool IsGoingAway() const { return availability_state_ == STATE_GOING_AWAY; }
431 bool IsDraining() const { return availability_state_ == STATE_DRAINING; } 433 bool IsDraining() const { return availability_state_ == STATE_DRAINING; }
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 // Used for posting asynchronous IO tasks. We use this even though 1211 // Used for posting asynchronous IO tasks. We use this even though
1210 // SpdySession is refcounted because we don't need to keep the SpdySession 1212 // SpdySession is refcounted because we don't need to keep the SpdySession
1211 // alive if the last reference is within a RunnableMethod. Just revoke the 1213 // alive if the last reference is within a RunnableMethod. Just revoke the
1212 // method. 1214 // method.
1213 base::WeakPtrFactory<SpdySession> weak_factory_; 1215 base::WeakPtrFactory<SpdySession> weak_factory_;
1214 }; 1216 };
1215 1217
1216 } // namespace net 1218 } // namespace net
1217 1219
1218 #endif // NET_SPDY_SPDY_SESSION_H_ 1220 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698