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

Unified Diff: net/cert/x509_util_openssl.cc

Issue 2694903006: Restore SSL_SESSION/X509Certificate X509* sharing (Closed)
Patch Set: . Created 3 years, 10 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 | « no previous file | net/socket/ssl_client_socket_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_util_openssl.cc
diff --git a/net/cert/x509_util_openssl.cc b/net/cert/x509_util_openssl.cc
index 4a2aba01dc60aa7df5163741d2faab3526e25f96..f59f313155d75ba8048c1a77e954a10b8d21cd68 100644
--- a/net/cert/x509_util_openssl.cc
+++ b/net/cert/x509_util_openssl.cc
@@ -274,6 +274,13 @@ bool ParseDate(ASN1_TIME* x509_time, base::Time* time) {
// (note: the DER-encoded data in |der_cache| is owned by |cert|, callers should
xunjieli 2017/02/21 15:54:05 nit: maybe update the comment. "|cert|" isn't pres
davidben 2017/02/28 00:17:42 Done.
// not free it).
bool GetDER(X509* x509, base::StringPiece* der_cache) {
+ if (x509->buf) {
+ *der_cache = base::StringPiece(
+ reinterpret_cast<const char*>(CRYPTO_BUFFER_data(x509->buf)),
+ CRYPTO_BUFFER_len(x509->buf));
+ return true;
+ }
+
int x509_der_cache_index =
g_der_cache_singleton.Get().der_cache_ex_index();
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698