| Index: net/cert/x509_util_openssl.cc
|
| diff --git a/net/cert/x509_util_openssl.cc b/net/cert/x509_util_openssl.cc
|
| index 4e79ad8a2115cad3b04d4e9048ad8efe7e094be1..32c421f7203b6daab95381389fcdeac6d94630bc 100644
|
| --- a/net/cert/x509_util_openssl.cc
|
| +++ b/net/cert/x509_util_openssl.cc
|
| @@ -285,9 +285,16 @@ bool ParseDate(ASN1_TIME* x509_time, base::Time* time) {
|
| }
|
|
|
| // Returns true if |der_cache| points to valid data, false otherwise.
|
| -// (note: the DER-encoded data in |der_cache| is owned by |cert|, callers should
|
| +// (note: the DER-encoded data in |der_cache| is owned by |x509|, callers should
|
| // 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();
|
|
|
|
|