Add ability to create self signed certs to mac.
BUG=67929
TEST=BUILD
Review URL: http://codereview.chromium.org/6312157
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74115 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/crypto/rsa_private_key.h b/base/crypto/rsa_private_key.h
index 9b8b4fd..5357adc2 100644
--- a/base/crypto/rsa_private_key.h
+++ b/base/crypto/rsa_private_key.h
@@ -64,6 +64,10 @@
// of the PublicKeyInfo structure to |output|.
bool ExportPublicKeyInfo(std::vector<uint8>* output);
+ // Exports the contents of the integer components to the ASN.1 DER encoding
+ // of the RSAPublicKey structure to |output|.
+ bool ExportPublicKey(std::vector<uint8>* output);
+
// Parses the ASN.1 DER encoding of the PrivateKeyInfo structure in |input|
// and populates the integer components with |big_endian_| byte-significance.
// IMPORTANT NOTE: This is currently *not* security-approved for importing
@@ -215,6 +219,7 @@
HCRYPTKEY key() { return key_; }
#elif defined(OS_MACOSX)
CSSM_KEY_PTR key() { return &key_; }
+ CSSM_KEY_PTR public_key() { return &public_key_; }
#endif
// Exports the private key to a PKCS #1 PrivateKey block.
@@ -257,6 +262,7 @@
ScopedHCRYPTKEY key_;
#elif defined(OS_MACOSX)
CSSM_KEY key_;
+ CSSM_KEY public_key_;
#endif
DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey);