OLD | NEW |
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 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived | 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived |
6 // from AuthCertificateCallback() in | 6 // from AuthCertificateCallback() in |
7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. | 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. |
8 | 8 |
9 /* ***** BEGIN LICENSE BLOCK ***** | 9 /* ***** BEGIN LICENSE BLOCK ***** |
10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
(...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 } | 2076 } |
2077 } | 2077 } |
2078 #endif | 2078 #endif |
2079 | 2079 |
2080 // Tell NSS to not verify the certificate. | 2080 // Tell NSS to not verify the certificate. |
2081 return SECSuccess; | 2081 return SECSuccess; |
2082 } | 2082 } |
2083 | 2083 |
2084 // static | 2084 // static |
2085 bool SSLClientSocketNSS::DomainBoundCertNegotiated(PRFileDesc* socket) { | 2085 bool SSLClientSocketNSS::DomainBoundCertNegotiated(PRFileDesc* socket) { |
2086 PRBool xtn_negotiated = PR_FALSE; | 2086 // TODO(wtc,mattm): this is temporary while DBC support is changed into |
2087 SECStatus rv = SSL_HandshakeNegotiatedExtension( | 2087 // Channel ID. |
2088 socket, ssl_ob_cert_xtn, &xtn_negotiated); | 2088 return false; |
2089 DCHECK_EQ(SECSuccess, rv); | |
2090 | |
2091 return xtn_negotiated ? true : false; | |
2092 } | 2089 } |
2093 | 2090 |
2094 SECStatus SSLClientSocketNSS::DomainBoundClientAuthHandler( | 2091 SECStatus SSLClientSocketNSS::DomainBoundClientAuthHandler( |
2095 const SECItem* cert_types, | 2092 const SECItem* cert_types, |
2096 CERTCertificate** result_certificate, | 2093 CERTCertificate** result_certificate, |
2097 SECKEYPrivateKey** result_private_key) { | 2094 SECKEYPrivateKey** result_private_key) { |
2098 domain_bound_cert_xtn_negotiated_ = true; | 2095 domain_bound_cert_xtn_negotiated_ = true; |
2099 | 2096 |
2100 // We have negotiated the domain-bound certificate extension. | 2097 // We have negotiated the domain-bound certificate extension. |
2101 std::string origin = "https://" + host_and_port_.ToString(); | 2098 std::string origin = "https://" + host_and_port_.ToString(); |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 EnsureThreadIdAssigned(); | 2639 EnsureThreadIdAssigned(); |
2643 base::AutoLock auto_lock(lock_); | 2640 base::AutoLock auto_lock(lock_); |
2644 return valid_thread_id_ == base::PlatformThread::CurrentId(); | 2641 return valid_thread_id_ == base::PlatformThread::CurrentId(); |
2645 } | 2642 } |
2646 | 2643 |
2647 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { | 2644 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { |
2648 return server_bound_cert_service_; | 2645 return server_bound_cert_service_; |
2649 } | 2646 } |
2650 | 2647 |
2651 } // namespace net | 2648 } // namespace net |
OLD | NEW |