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

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

Issue 2337253004: Update Token Binding code to the latest drafts (Closed)
Patch Set: Fix compilation error in unit_tests 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
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Signs the EKM value for Token Binding from the TLS layer using |*key| and
419 // puts the result in |*out|. Returns OK or ERR_FAILED. 419 // puts the result in |*out|. Returns OK or ERR_FAILED.
davidben 2016/09/19 21:24:14 Did you mean to remove the old comment?
nharper 2016/09/19 22:32:23 Yes. Removed.
420 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, 420 // Generates the signature used in Token Binding using |*key| and for a Token
421 std::vector<uint8_t>* out); 421 // Binding of type |tb_type|, putting the signature in |*out|. Returns a net
422 // error code.
423 Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
424 TokenBindingType tb_type,
425 std::vector<uint8_t>* out);
422 426
423 // Send a WINDOW_UPDATE frame for a stream. Called by a stream 427 // Send a WINDOW_UPDATE frame for a stream. Called by a stream
424 // whenever receive window size is increased. 428 // whenever receive window size is increased.
425 void SendStreamWindowUpdate(SpdyStreamId stream_id, 429 void SendStreamWindowUpdate(SpdyStreamId stream_id,
426 uint32_t delta_window_size); 430 uint32_t delta_window_size);
427 431
428 // Accessors for the session's availability state. 432 // Accessors for the session's availability state.
429 bool IsAvailable() const { return availability_state_ == STATE_AVAILABLE; } 433 bool IsAvailable() const { return availability_state_ == STATE_AVAILABLE; }
430 bool IsGoingAway() const { return availability_state_ == STATE_GOING_AWAY; } 434 bool IsGoingAway() const { return availability_state_ == STATE_GOING_AWAY; }
431 bool IsDraining() const { return availability_state_ == STATE_DRAINING; } 435 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 1213 // Used for posting asynchronous IO tasks. We use this even though
1210 // SpdySession is refcounted because we don't need to keep the SpdySession 1214 // 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 1215 // alive if the last reference is within a RunnableMethod. Just revoke the
1212 // method. 1216 // method.
1213 base::WeakPtrFactory<SpdySession> weak_factory_; 1217 base::WeakPtrFactory<SpdySession> weak_factory_;
1214 }; 1218 };
1215 1219
1216 } // namespace net 1220 } // namespace net
1217 1221
1218 #endif // NET_SPDY_SPDY_SESSION_H_ 1222 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698