diff options
author | davidben <davidben@chromium.org> | 2015-07-02 06:36:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-02 13:36:42 +0000 |
commit | 97c06a06d77d2dbff62812c41f6c7eb80d7e47ba (patch) | |
tree | 8ba4441376112354adaf8be234567dd063cb1154 /components/ownership | |
parent | d78f2e2f36cf791bc4ef3cbfaa3ad471c8354116 (diff) | |
download | chromium_src-97c06a06d77d2dbff62812c41f6c7eb80d7e47ba.zip chromium_src-97c06a06d77d2dbff62812c41f6c7eb80d7e47ba.tar.gz chromium_src-97c06a06d77d2dbff62812c41f6c7eb80d7e47ba.tar.bz2 |
Add missing EnsureNSSInit to MockOwnerKeyUtil.
We can no longer rely on other subsystems to initialize NSS. In this case, the
offending function was MockOwnerKeyUtil::SetPrivateKey.
BUG=462040
Review URL: https://codereview.chromium.org/1208993005
Cr-Commit-Position: refs/heads/master@{#337216}
Diffstat (limited to 'components/ownership')
-rw-r--r-- | components/ownership/mock_owner_key_util.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/ownership/mock_owner_key_util.cc b/components/ownership/mock_owner_key_util.cc index 3f5adb5..5b28c78 100644 --- a/components/ownership/mock_owner_key_util.cc +++ b/components/ownership/mock_owner_key_util.cc @@ -9,6 +9,7 @@ #include "base/files/file_path.h" #include "base/logging.h" #include "crypto/nss_key_util.h" +#include "crypto/nss_util.h" #include "crypto/rsa_private_key.h" namespace ownership { @@ -52,6 +53,8 @@ void MockOwnerKeyUtil::SetPublicKeyFromPrivateKey( } void MockOwnerKeyUtil::SetPrivateKey(scoped_ptr<crypto::RSAPrivateKey> key) { + crypto::EnsureNSSInit(); + CHECK(key->ExportPublicKey(&public_key_)); std::vector<uint8_t> key_exported; |