Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: net/cert/x509_certificate_openssl.cc

Issue 474663002: Remove manual CRYPTO_add calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: speling Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/openssl_private_key_store_memory.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_certificate_openssl.cc
diff --git a/net/cert/x509_certificate_openssl.cc b/net/cert/x509_certificate_openssl.cc
index 504f3aea5f33fe2b0a98ee510e2b6feaf364a365..fdd0e48d8551eef12623ea3e7d3b397d039147de 100644
--- a/net/cert/x509_certificate_openssl.cc
+++ b/net/cert/x509_certificate_openssl.cc
@@ -241,13 +241,7 @@ void sk_X509_NAME_free_all(STACK_OF(X509_NAME)* sk) {
X509Certificate::OSCertHandle X509Certificate::DupOSCertHandle(
OSCertHandle cert_handle) {
DCHECK(cert_handle);
- // Using X509_dup causes the entire certificate to be reparsed. This
- // conversion, besides being non-trivial, drops any associated
- // application-specific data set by X509_set_ex_data. Using CRYPTO_add
- // just bumps up the ref-count for the cert, without causing any allocations
- // or deallocations.
- CRYPTO_add(&cert_handle->references, 1, CRYPTO_LOCK_X509);
- return cert_handle;
+ return X509_up_ref(cert_handle);
}
// static
« no previous file with comments | « net/base/openssl_private_key_store_memory.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698