Index: crypto/rsa_private_key_nss.cc |
diff --git a/crypto/rsa_private_key_nss.cc b/crypto/rsa_private_key_nss.cc |
index cd1f9203f3517b1cbe4451ab9700803d52c055fd..b215edabc13309e3cfaa6a1b4df340e081166062 100644 |
--- a/crypto/rsa_private_key_nss.cc |
+++ b/crypto/rsa_private_key_nss.cc |
@@ -138,6 +138,12 @@ RSAPrivateKey* RSAPrivateKey::FindFromPublicKeyInfo( |
return NULL; |
} |
+RSAPrivateKey* RSAPrivateKey::Copy() const { |
+ RSAPrivateKey* copy = new RSAPrivateKey(); |
+ copy->key_ = SECKEY_CopyPrivateKey(key_); |
+ copy->public_key_ = SECKEY_CopyPublicKey(public_key_); |
+ return copy; |
+} |
bool RSAPrivateKey::ExportPrivateKey(std::vector<uint8>* output) { |
PrivateKeyInfoCodec private_key_info(true); |