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 // OpenSSL binding for SSLClientSocket. The class layout and general principle | 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle |
6 // of operation is derived from SSLClientSocketNSS. | 6 // of operation is derived from SSLClientSocketNSS. |
7 | 7 |
8 #include "net/socket/ssl_client_socket_openssl.h" | 8 #include "net/socket/ssl_client_socket_openssl.h" |
9 | 9 |
10 #include <errno.h> | 10 #include <errno.h> |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 BOOL ok = CertSetCertificateContextProperty( | 1324 BOOL ok = CertSetCertificateContextProperty( |
1325 server_cert_->os_cert_handle(), | 1325 server_cert_->os_cert_handle(), |
1326 CERT_OCSP_RESPONSE_PROP_ID, | 1326 CERT_OCSP_RESPONSE_PROP_ID, |
1327 CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG, | 1327 CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG, |
1328 &ocsp_response_blob); | 1328 &ocsp_response_blob); |
1329 if (!ok) { | 1329 if (!ok) { |
1330 VLOG(1) << "Failed to set OCSP response property: " | 1330 VLOG(1) << "Failed to set OCSP response property: " |
1331 << GetLastError(); | 1331 << GetLastError(); |
1332 } | 1332 } |
1333 #else | 1333 #else |
| 1334 // TODO(davidben): Support OCSP stapling when NSS is the system |
| 1335 // certificate verifier. https://crbug.com/462040. |
1334 NOTREACHED(); | 1336 NOTREACHED(); |
1335 #endif | 1337 #endif |
1336 } | 1338 } |
1337 } | 1339 } |
1338 } | 1340 } |
1339 | 1341 |
1340 void SSLClientSocketOpenSSL::VerifyCT() { | 1342 void SSLClientSocketOpenSSL::VerifyCT() { |
1341 if (!cert_transparency_verifier_) | 1343 if (!cert_transparency_verifier_) |
1342 return; | 1344 return; |
1343 | 1345 |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 ct::SCT_STATUS_LOG_UNKNOWN)); | 2046 ct::SCT_STATUS_LOG_UNKNOWN)); |
2045 } | 2047 } |
2046 } | 2048 } |
2047 | 2049 |
2048 scoped_refptr<X509Certificate> | 2050 scoped_refptr<X509Certificate> |
2049 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { | 2051 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { |
2050 return server_cert_; | 2052 return server_cert_; |
2051 } | 2053 } |
2052 | 2054 |
2053 } // namespace net | 2055 } // namespace net |
OLD | NEW |