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 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 BOOL ok = CertSetCertificateContextProperty( | 1189 BOOL ok = CertSetCertificateContextProperty( |
1190 server_cert_->os_cert_handle(), | 1190 server_cert_->os_cert_handle(), |
1191 CERT_OCSP_RESPONSE_PROP_ID, | 1191 CERT_OCSP_RESPONSE_PROP_ID, |
1192 CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG, | 1192 CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG, |
1193 &ocsp_response_blob); | 1193 &ocsp_response_blob); |
1194 if (!ok) { | 1194 if (!ok) { |
1195 VLOG(1) << "Failed to set OCSP response property: " | 1195 VLOG(1) << "Failed to set OCSP response property: " |
1196 << GetLastError(); | 1196 << GetLastError(); |
1197 } | 1197 } |
1198 #else | 1198 #else |
| 1199 // TODO(davidben): Support OCSP stapling when NSS is the system |
| 1200 // certificate verifier. https://crbug.com/479034. |
1199 NOTREACHED(); | 1201 NOTREACHED(); |
1200 #endif | 1202 #endif |
1201 } | 1203 } |
1202 } | 1204 } |
1203 } | 1205 } |
1204 | 1206 |
1205 void SSLClientSocketOpenSSL::VerifyCT() { | 1207 void SSLClientSocketOpenSSL::VerifyCT() { |
1206 if (!cert_transparency_verifier_) | 1208 if (!cert_transparency_verifier_) |
1207 return; | 1209 return; |
1208 | 1210 |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1916 | 1918 |
1917 return result; | 1919 return result; |
1918 } | 1920 } |
1919 | 1921 |
1920 scoped_refptr<X509Certificate> | 1922 scoped_refptr<X509Certificate> |
1921 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { | 1923 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { |
1922 return server_cert_; | 1924 return server_cert_; |
1923 } | 1925 } |
1924 | 1926 |
1925 } // namespace net | 1927 } // namespace net |
OLD | NEW |