summaryrefslogtreecommitdiffstats
path: root/crypto/ec_private_key_openssl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Cut down on usage of deprecated APIs in //crypto.davidben2016-03-011-54/+42
| | | | | | | | | | | | | | | SSL_library_init is deprecated. It's CRYPTO_library_init. Switch from the legacy ASN.1 APIs to the new parsers where feasible. ECPrivateKey::CreateFromEncryptedPrivateKeyInfo is left alone for now as we still need a new version of those APIs. This also adds a scoper for CBB for use in later CLs. BUG=499653 Review URL: https://codereview.chromium.org/1739403002 Cr-Commit-Position: refs/heads/master@{#378610}
* Switch to standard integer types in crypto/.avi2015-12-211-13/+14
| | | | | | | | | | BUG=138542 TBR=rsleevi@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1539353003 Cr-Commit-Position: refs/heads/master@{#366460}
* Remove crypto::ECPrivateKey::IsSupported.davidben2015-10-151-3/+0
| | | | | | | | | | | | We no longer need to worry about the system NSS on decrepit Linux distributions. The only platform where ECPrivateKey is backed by NSS is iOS and we control that one. BUG=519504 Review URL: https://codereview.chromium.org/1408813002 Cr-Commit-Position: refs/heads/master@{#354379}
* Roll src/third_party/boringssl/src 12fe1b25e..ac8302a09davidben2015-09-021-1/+2
| | | | | | | | | | | | https://boringssl.googlesource.com/boringssl/+log/12fe1b25ead258858309d22ffa9e1f9a316358d7..ac8302a092e8e232dbabf5a01eff5dd37671b5c8 Also add a script to do the roll so I don't forget to update build files. BUG=none Review URL: https://codereview.chromium.org/1321793002 Cr-Commit-Position: refs/heads/master@{#346841}
* Replace EVP_PKEY_dup calls with EVP_PKEY_up_ref.davidben2015-05-131-1/+1
| | | | | | | | | | | | | | This is a no-op change. BoringSSL deprecated EVP_PKEY_dup in favor of a new EVP_PKEY_up_ref. This makes it more obvious there isn't actually a copy and is more consistent with other ref-counted types. See https://boringssl.googlesource.com/boringssl/+/517da2f1efc91b179dfb1898f826b18a6a38f547%5E%21/#F3 BUG=none Review URL: https://codereview.chromium.org/1129083007 Cr-Commit-Position: refs/heads/master@{#329732}
* Add support for crypto::ECPrivateKey::Copy when built with BoringSSLnharper2015-05-121-0/+7
| | | | | | | | BUG=457566 Review URL: https://codereview.chromium.org/1133303003 Cr-Commit-Position: refs/heads/master@{#329527}
* Convert crypto::ScopedOpenSSL to type aliases.davidben2015-02-211-3/+3
| | | | | | | | | | This avoids having to put '::Type' everywhere. BUG=none Review URL: https://codereview.chromium.org/948543002 Cr-Commit-Position: refs/heads/master@{#317462}
* Align OpenSSL and NSS ChannelID formats.davidben@chromium.org2014-08-061-26/+29
| | | | | | | | | | | | | | | | NSS would use "" as the password while OpenSSL would use "\0\0" (UCS-2 encoding of a NUL-terminated string) because of how PKCS#12 recommended encoding passwords. Make the OpenSSL code use the same format so that we can freely switch back and forth between NSS and OpenSSL. (This is in case we need to roll back an OpenSSL cutover and the release has hit some early release channel already.) BUG=399121 Review URL: https://codereview.chromium.org/435593003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287890 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate ScopedOpenSSL in favour of scoped_ptr<> specializations.rsleevi@chromium.org2014-07-101-24/+22
| | | | | | | | | | | | | | | | | | | | | | Match the NSS, CryptoAPI (Win) and Security (OS X) approaches by declaring the scoped types as specializations of our existing scoped classes. Like NSS, this requires an intermediate helper type, because our scoped_ptr<> doesn't accept deleter functions as template arguments (though they are valid in C++11's unique_ptr<>). A few base cryptographic (non-certificate) types are used in scoped_openssl_types.h, while the remainder are left for implementations to specialize as needed. In an ideal world, this would be scoped_ptr<FOO, FOO_free>, but that will require unique_ptr<> support. BUG=388904 Review URL: https://codereview.chromium.org/361193003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282257 0039d316-1c4b-4281-b951-d872f2087c98
* crypto: Add ECPrivateKey::Copy (not needed for OpenSSL) andwtc@chromium.org2014-06-241-1/+22
| | | | | | | | | | ECPrivateKey::ExportRawPublicKey. R=rsleevi@chromium.org Review URL: https://codereview.chromium.org/279973005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279308 0039d316-1c4b-4281-b951-d872f2087c98
* Hack to allow ec_private_key_openssl loading keys generated with NSS.mattm@chromium.org2014-03-221-0/+5
| | | | | | | | BUG=none Review URL: https://codereview.chromium.org/205333002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258739 0039d316-1c4b-4281-b951-d872f2087c98
* NSS: {EC,RSA}PrivateKey shouldn't call crypto::GetPublicNSSKeySlot or ↵mattm@chromium.org2013-11-131-15/+0
| | | | | | | | | | | | | | | | | GetPrivateNSSKeySlot. Make ECPrivateKey use PK11_GetInternalKeySlot for temporary keys. Make ECPrivateKey and RSAPrivateKey "sensitive" functions take slot as parameter. This avoids calling non-thread-safe functions in nss_util on arbitrary threads. Also removes the ANNOTATE_SCOPED_MEMORY_LEAK from RSAPrivateKey which should no longer be necessary. BUG=125848,34742 Review URL: https://codereview.chromium.org/66213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234726 0039d316-1c4b-4281-b951-d872f2087c98
* openssl: Implement crypto::ECPrivateKey.digit@chromium.org2013-10-171-16/+164
| | | | | | | | | BUG=306176 R=rsleevi@chromium.org, wtc@chromium.org, agl@chromium.org Review URL: https://codereview.chromium.org/27195002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229153 0039d316-1c4b-4281-b951-d872f2087c98
* NSS Channel ID: don't check ECC support on every socket creation.mattm@chromium.org2012-07-091-1/+6
| | | | | | | | | | | Add static function to ECPrivateKey to get which NSS slot it uses. BUG=127506 Review URL: https://chromiumcodereview.appspot.com/10700099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145777 0039d316-1c4b-4281-b951-d872f2087c98
* Add ECPrivateKey for Elliptic Curve keypair generation.mattm@chromium.org2011-11-091-0/+66
The implementation uses NSS on all platforms unless USE_OPENSSL is defined (which is only stubbed out in this CL). BUG=88782 TEST=ECPrivateKeyUnitTest Review URL: http://codereview.chromium.org/8413024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109188 0039d316-1c4b-4281-b951-d872f2087c98