Commit 16cfe7ec authored by rch@chromium.org's avatar rch@chromium.org

Revert 113409 - Add a new method to SSLClientSocket:

  was_origin_cert_sent()

This will help SpdySession decide to send a CREDENTIAL frame.

BUG=106103
TEST=none

Review URL: http://codereview.chromium.org/8817021

TBR=rch@chromium.org
Review URL: http://codereview.chromium.org/8850003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113419 0039d316-1c4b-4281-b951-d872f2087c98
parent a7d0da5b
...@@ -10,8 +10,7 @@ namespace net { ...@@ -10,8 +10,7 @@ namespace net {
SSLClientSocket::SSLClientSocket() SSLClientSocket::SSLClientSocket()
: was_npn_negotiated_(false), : was_npn_negotiated_(false),
was_spdy_negotiated_(false), was_spdy_negotiated_(false) {
was_origin_bound_cert_sent_(false) {
} }
SSLClientSocket::NextProto SSLClientSocket::NextProtoFromString( SSLClientSocket::NextProto SSLClientSocket::NextProtoFromString(
...@@ -91,12 +90,4 @@ bool SSLClientSocket::set_was_spdy_negotiated(bool negotiated) { ...@@ -91,12 +90,4 @@ bool SSLClientSocket::set_was_spdy_negotiated(bool negotiated) {
return was_spdy_negotiated_ = negotiated; return was_spdy_negotiated_ = negotiated;
} }
bool SSLClientSocket::was_origin_bound_cert_sent() const {
return was_origin_bound_cert_sent_;
}
bool SSLClientSocket::set_was_origin_bound_cert_sent(bool sent) {
return was_origin_bound_cert_sent_ = sent;
}
} // namespace net } // namespace net
...@@ -126,21 +126,11 @@ class NET_EXPORT SSLClientSocket : public SSLSocket { ...@@ -126,21 +126,11 @@ class NET_EXPORT SSLClientSocket : public SSLSocket {
virtual bool set_was_spdy_negotiated(bool negotiated); virtual bool set_was_spdy_negotiated(bool negotiated);
// Returns true if an origin bound certificate was sent on this connection.
// This may be useful for protocols, like SPDY, which allow the same
// connection to be shared between multiple origins, each of which need
// an origin bound certificate.
virtual bool was_origin_bound_cert_sent() const;
virtual bool set_was_origin_bound_cert_sent(bool sent);
private: private:
// True if NPN was responded to, independent of selecting SPDY or HTTP. // True if NPN was responded to, independent of selecting SPDY or HTTP.
bool was_npn_negotiated_; bool was_npn_negotiated_;
// True if NPN successfully negotiated SPDY. // True if NPN successfully negotiated SPDY.
bool was_spdy_negotiated_; bool was_spdy_negotiated_;
// True if an origin bound certificate was sent.
bool was_origin_bound_cert_sent_;
}; };
} // namespace net } // namespace net
......
...@@ -1717,7 +1717,6 @@ int SSLClientSocketNSS::DoGetOBCertComplete(int result) { ...@@ -1717,7 +1717,6 @@ int SSLClientSocketNSS::DoGetOBCertComplete(int result) {
return MapNSSError(PORT_GetError()); return MapNSSError(PORT_GetError());
GotoState(STATE_HANDSHAKE); GotoState(STATE_HANDSHAKE);
set_was_origin_bound_cert_sent(true);
return OK; return OK;
} }
...@@ -2273,9 +2272,7 @@ SECStatus SSLClientSocketNSS::OriginBoundClientAuthHandler( ...@@ -2273,9 +2272,7 @@ SECStatus SSLClientSocketNSS::OriginBoundClientAuthHandler(
// Synchronous success. // Synchronous success.
int result = ImportOBCertAndKey(result_certificate, int result = ImportOBCertAndKey(result_certificate,
result_private_key); result_private_key);
if (result == OK) if (result != OK)
set_was_origin_bound_cert_sent(true);
else
rv = SECFailure; rv = SECFailure;
} else { } else {
rv = SECFailure; // Synchronous failure. rv = SECFailure; // Synchronous failure.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment