summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-09 02:04:05 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-09 02:04:05 +0000
commit976e990283c392e514398b6c113c11427b3a1761 (patch)
tree901a514f2d4cedf248a133b3e3dbe5c7a57f7818 /crypto
parent91bd86e6aae59dc49094ff3baf545f0be2defd8e (diff)
downloadchromium_src-976e990283c392e514398b6c113c11427b3a1761.zip
chromium_src-976e990283c392e514398b6c113c11427b3a1761.tar.gz
chromium_src-976e990283c392e514398b6c113c11427b3a1761.tar.bz2
Add EnsureNSSInit in SymmetricKey::Import.
BUG=none TEST=crypto unit tests Review URL: http://codereview.chromium.org/9359027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto')
-rw-r--r--crypto/symmetric_key_nss.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/symmetric_key_nss.cc b/crypto/symmetric_key_nss.cc
index 546c457..6772532 100644
--- a/crypto/symmetric_key_nss.cc
+++ b/crypto/symmetric_key_nss.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -83,6 +83,7 @@ SymmetricKey* SymmetricKey::DeriveKeyFromPassword(Algorithm algorithm,
// static
SymmetricKey* SymmetricKey::Import(Algorithm algorithm,
const std::string& raw_key) {
+ EnsureNSSInit();
CK_MECHANISM_TYPE cipher =
algorithm == AES ? CKM_AES_CBC : CKM_SHA_1_HMAC;