Index: content/child/webcrypto/nss/sym_key_nss.cc |
diff --git a/content/child/webcrypto/nss/sym_key_nss.cc b/content/child/webcrypto/nss/sym_key_nss.cc |
index 08eef2836cfbfb5194f74e42c7a2b18a190df5d2..b779e92f6ff941698069146bef65898c41719292 100644 |
--- a/content/child/webcrypto/nss/sym_key_nss.cc |
+++ b/content/child/webcrypto/nss/sym_key_nss.cc |
@@ -6,6 +6,7 @@ |
#include "base/logging.h" |
#include "content/child/webcrypto/crypto_data.h" |
+#include "content/child/webcrypto/generate_key_result.h" |
#include "content/child/webcrypto/nss/key_nss.h" |
#include "content/child/webcrypto/nss/util_nss.h" |
#include "content/child/webcrypto/status.h" |
@@ -22,7 +23,7 @@ Status GenerateSecretKeyNss(const blink::WebCryptoKeyAlgorithm& algorithm, |
blink::WebCryptoKeyUsageMask usage_mask, |
unsigned keylen_bytes, |
CK_MECHANISM_TYPE mechanism, |
- blink::WebCryptoKey* key) { |
+ GenerateKeyResult* result) { |
DCHECK_NE(CKM_INVALID_MECHANISM, mechanism); |
crypto::ScopedPK11Slot slot(PK11_GetInternalKeySlot()); |
@@ -45,11 +46,13 @@ Status GenerateSecretKeyNss(const blink::WebCryptoKeyAlgorithm& algorithm, |
scoped_ptr<SymKeyNss> handle(new SymKeyNss( |
pk11_key.Pass(), CryptoData(key_data->data, key_data->len))); |
- *key = blink::WebCryptoKey::create(handle.release(), |
- blink::WebCryptoKeyTypeSecret, |
- extractable, |
- algorithm, |
- usage_mask); |
+ result->AssignSecretKey( |
+ blink::WebCryptoKey::create(handle.release(), |
+ blink::WebCryptoKeyTypeSecret, |
+ extractable, |
+ algorithm, |
+ usage_mask)); |
+ |
return Status::Success(); |
} |