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

Unified Diff: net/test/cert_test_util_nss.cc

Issue 881213004: Support building BoringSSL with NSS certificates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sleevi comments, various build and test fixes Created 5 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
« net/ssl/channel_id_service.cc ('K') | « net/ssl/openssl_platform_key_nss.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/cert_test_util_nss.cc
diff --git a/net/test/cert_test_util_nss.cc b/net/test/cert_test_util_nss.cc
index ee929e5a41fac9f9b78ec563b80c78ca9d61ce0a..fa3e31ec141c6b2fc8c2d49d8780d16121610c38 100644
--- a/net/test/cert_test_util_nss.cc
+++ b/net/test/cert_test_util_nss.cc
@@ -19,6 +19,14 @@ scoped_ptr<crypto::RSAPrivateKey> ImportSensitiveKeyFromFile(
const base::FilePath& dir,
const std::string& key_filename,
PK11SlotInfo* slot) {
+#if defined(USE_OPENSSL)
+ // TODO(davidben): Port RSAPrivateKey::CreateSensitiveFromPrivateKeyInfo away
+ // from RSAPrivateKey so it doesn't make assumptions about the internal crypto
+ // library. Instead, return a ScopedSECKEYPrivateKey or have this function
+ // just return bool.
+ NOTIMPLEMENTED();
+ return nullptr;
+#else
base::FilePath key_path = dir.AppendASCII(key_filename);
std::string key_pkcs8;
bool success = base::ReadFileToString(key_path, &key_pkcs8);
@@ -38,6 +46,7 @@ scoped_ptr<crypto::RSAPrivateKey> ImportSensitiveKeyFromFile(
LOG_IF(ERROR, !private_key) << "Could not create key from file "
<< key_path.value();
return private_key.Pass();
+#endif
}
bool ImportClientCertToSlot(const scoped_refptr<X509Certificate>& cert,
« net/ssl/channel_id_service.cc ('K') | « net/ssl/openssl_platform_key_nss.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698