Index: net/cert/ct_objects_extractor.cc |
diff --git a/net/cert/ct_objects_extractor.cc b/net/cert/ct_objects_extractor.cc |
index 1a6e6e4772d63a4dd924e11220ef4b5f934d4a10..852bf827015a72b15555fc81a5b149ccb84d7f91 100644 |
--- a/net/cert/ct_objects_extractor.cc |
+++ b/net/cert/ct_objects_extractor.cc |
@@ -41,7 +41,9 @@ bool StringEqualToCBS(const std::string& value1, const CBS* value2) { |
bssl::UniquePtr<X509> OSCertHandleToOpenSSL( |
X509Certificate::OSCertHandle os_handle) { |
-#if defined(USE_OPENSSL_CERTS) |
+#if BUILDFLAG(USE_BYTE_CERTS) |
+ return bssl::UniquePtr<X509>(X509_parse_from_buffer(os_handle)); |
+#elif defined(USE_OPENSSL_CERTS) |
return bssl::UniquePtr<X509>(X509Certificate::DupOSCertHandle(os_handle)); |
#else |
std::string der_encoded; |