Index: crypto/rsa_private_key_nss.cc |
diff --git a/crypto/rsa_private_key_nss.cc b/crypto/rsa_private_key_nss.cc |
index 078544de0c3fa0a81e8bdb952113511c9b475471..ebc5e518e81574c18ec0dee47ee11ea75d9e076c 100644 |
--- a/crypto/rsa_private_key_nss.cc |
+++ b/crypto/rsa_private_key_nss.cc |
@@ -87,6 +87,7 @@ RSAPrivateKey* RSAPrivateKey::Create(uint16 num_bits) { |
ScopedPK11Slot slot(PK11_GetInternalSlot()); |
return CreateWithParams(slot.get(), |
num_bits, |
+ kDefaultPublicExponent, |
false /* not permanent */, |
false /* not sensitive */); |
} |
@@ -105,11 +106,15 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo( |
} |
#if defined(USE_NSS) |
+uint64 RSAPrivateKey::kDefaultPublicExponent = 65537L; |
Ryan Sleevi
2014/06/03 19:35:29
1) Wrong suffix
2) Wrong format for declaring cons
|
+ |
// static |
RSAPrivateKey* RSAPrivateKey::CreateSensitive(PK11SlotInfo* slot, |
- uint16 num_bits) { |
+ uint16 num_bits, |
+ uint64 public_exponent) { |
return CreateWithParams(slot, |
num_bits, |
+ public_exponent, |
true /* permanent */, |
true /* sensitive */); |
} |
@@ -244,6 +249,7 @@ RSAPrivateKey::RSAPrivateKey() : key_(NULL), public_key_(NULL) { |
// static |
RSAPrivateKey* RSAPrivateKey::CreateWithParams(PK11SlotInfo* slot, |
uint16 num_bits, |
+ uint64 public_exponent, |
bool permanent, |
bool sensitive) { |
if (!slot) |
@@ -253,7 +259,7 @@ RSAPrivateKey* RSAPrivateKey::CreateWithParams(PK11SlotInfo* slot, |
PK11RSAGenParams param; |
param.keySizeInBits = num_bits; |
- param.pe = 65537L; |
+ param.pe = public_exponent; |
result->key_ = PK11_GenerateKeyPair(slot, |
CKM_RSA_PKCS_KEY_PAIR_GEN, |
¶m, |