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

Unified Diff: crypto/nss_key_util.cc

Issue 2046863002: Remove traces of USE_NSS_CERTS from crypto/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
Index: crypto/nss_key_util.cc
diff --git a/crypto/nss_key_util.cc b/crypto/nss_key_util.cc
index 1f726674ec8272017cd187f947c5783d2530550b..da8d9c39b153c80c948f367dcfd9aff3d59a3487 100644
--- a/crypto/nss_key_util.cc
+++ b/crypto/nss_key_util.cc
@@ -7,24 +7,19 @@
#include <cryptohi.h>
#include <keyhi.h>
#include <pk11pub.h>
+#include <secmod.h>
#include <stdint.h>
#include <memory>
#include "base/logging.h"
#include "crypto/nss_util.h"
-
-#if defined(USE_NSS_CERTS)
-#include <secmod.h>
#include "crypto/nss_util_internal.h"
-#endif
namespace crypto {
namespace {
-#if defined(USE_NSS_CERTS)
-
struct PublicKeyInfoDeleter {
inline void operator()(CERTSubjectPublicKeyInfo* spki) {
SECKEY_DestroySubjectPublicKeyInfo(spki);
@@ -59,8 +54,6 @@ ScopedSECItem MakeIDFromSPKI(const std::vector<uint8_t>& input) {
return ScopedSECItem(PK11_MakeIDFromPubKey(&result->u.rsa.modulus));
}
-#endif // defined(USE_NSS_CERTS)
-
} // namespace
bool GenerateRSAKeyPairNSS(PK11SlotInfo* slot,
@@ -118,8 +111,6 @@ ScopedSECKEYPrivateKey ImportNSSKeyFromPrivateKeyInfo(
return ScopedSECKEYPrivateKey(key_raw);
}
-#if defined(USE_NSS_CERTS)
-
ScopedSECKEYPrivateKey FindNSSKeyFromPublicKeyInfo(
const std::vector<uint8_t>& input) {
EnsureNSSInit();
@@ -160,6 +151,4 @@ ScopedSECKEYPrivateKey FindNSSKeyFromPublicKeyInfoInSlot(
PK11_FindKeyByKeyID(slot, cka_id.get(), nullptr));
}
-#endif // defined(USE_NSS_CERTS)
-
} // namespace crypto

Powered by Google App Engine
This is Rietveld 408576698