diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-20 01:39:23 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-20 01:39:23 +0000 |
commit | aeea2296573c8788e576bd283cb53206e4ee26f4 (patch) | |
tree | 8cca515566fe8f48daab1030e27eb211ef81a6a8 /base/crypto | |
parent | a52f0e5b6b6a8d523c66f04545ad943220bbf239 (diff) | |
download | chromium_src-aeea2296573c8788e576bd283cb53206e4ee26f4.zip chromium_src-aeea2296573c8788e576bd283cb53206e4ee26f4.tar.gz chromium_src-aeea2296573c8788e576bd283cb53206e4ee26f4.tar.bz2 |
TBR: Add more logging to try and track down flakey crypto tests.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/crypto')
-rw-r--r-- | base/crypto/rsa_private_key_win.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/base/crypto/rsa_private_key_win.cc b/base/crypto/rsa_private_key_win.cc index c29c5ce..eba60e8 100644 --- a/base/crypto/rsa_private_key_win.cc +++ b/base/crypto/rsa_private_key_win.cc @@ -4,10 +4,12 @@ #include "base/crypto/rsa_private_key.h" +#include <iostream> #include <list> #include "base/logging.h" #include "base/scoped_ptr.h" +#include "base/string_util.h" // This file manually encodes and decodes RSA private keys using PrivateKeyInfo @@ -209,6 +211,12 @@ RSAPrivateKey* RSAPrivateKey::Create(uint16 num_bits) { if (!CryptGenKey(result->provider_, CALG_RSA_SIGN, flags, &result->key_)) return NULL; + std::vector<uint8> out; + result->ExportPrivateKey(&out); + std::cout << "Generated random key: " + << HexEncode(&out.front(), out.size()) + << "\n"; + return result.release(); } |