Chromium Code Reviews| Index: net/socket/ssl_client_socket_openssl.cc |
| diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc |
| index b63e120108eaba2cce38ebac3917f80501658c37..68b30e0fb1d896ff4e4884c42cc3db7e94c6fc4b 100644 |
| --- a/net/socket/ssl_client_socket_openssl.cc |
| +++ b/net/socket/ssl_client_socket_openssl.cc |
| @@ -18,6 +18,7 @@ |
| #include "base/synchronization/lock.h" |
| #include "crypto/ec_private_key.h" |
| #include "crypto/openssl_util.h" |
| +#include "crypto/scoped_openssl_types.h" |
| #include "net/base/net_errors.h" |
| #include "net/cert/cert_verifier.h" |
| #include "net/cert/single_request_cert_verifier.h" |
| @@ -170,7 +171,8 @@ class SSLClientSocketOpenSSL::SSLContext { |
| // SSLClientSocketOpenSSL object from an SSL instance. |
| int ssl_socket_data_index_; |
| - crypto::ScopedOpenSSL<SSL_CTX, SSL_CTX_free> ssl_ctx_; |
| + scoped_ptr<SSL_CTX, crypto::OpenSSLDestroyer<SSL_CTX, SSL_CTX_free> > |
| + ssl_ctx_; |
| // |session_cache_| must be destroyed before |ssl_ctx_|. |
| SSLSessionCacheOpenSSL session_cache_; |
| }; |
| @@ -213,9 +215,12 @@ class SSLClientSocketOpenSSL::PeerCertificateChain { |
| sk_X509_pop_free(cert_chain, X509_free); |
| } |
| - friend class crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack>; |
| + typedef scoped_ptr<STACK_OF(X509), |
| + crypto::OpenSSLDestroyer<STACK_OF(X509), FreeX509Stack> > |
| + ScopedX509Stack; |
| + friend struct crypto::OpenSSLDestroyer<STACK_OF(X509), FreeX509Stack>; |
|
wtc
2014/07/02 20:13:13
This friend declaration seems wrong. To match the
Ryan Sleevi
2014/07/02 20:16:30
It's correct. OpenSSLDestroyer is what actually ca
|
| - crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack> openssl_chain_; |
| + ScopedX509Stack openssl_chain_; |
| scoped_refptr<X509Certificate> os_chain_; |
| }; |