Index: content/child/webcrypto/openssl/sym_key_openssl.cc |
diff --git a/content/child/webcrypto/openssl/sym_key_openssl.cc b/content/child/webcrypto/openssl/sym_key_openssl.cc |
index e07db69ee7f3f6e96feb5cdcfe34913da8f0f908..21af6831c4f6efc8f4f53cb87105789e9d031339 100644 |
--- a/content/child/webcrypto/openssl/sym_key_openssl.cc |
+++ b/content/child/webcrypto/openssl/sym_key_openssl.cc |
@@ -8,6 +8,7 @@ |
#include <openssl/rand.h> |
#include "content/child/webcrypto/crypto_data.h" |
+#include "content/child/webcrypto/generate_key_result.h" |
#include "content/child/webcrypto/openssl/key_openssl.h" |
#include "content/child/webcrypto/status.h" |
#include "crypto/openssl_util.h" |
@@ -21,7 +22,7 @@ Status GenerateSecretKeyOpenSsl(const blink::WebCryptoKeyAlgorithm& algorithm, |
bool extractable, |
blink::WebCryptoKeyUsageMask usage_mask, |
unsigned keylen_bytes, |
- blink::WebCryptoKey* key) { |
+ GenerateKeyResult* result) { |
crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); |
std::vector<unsigned char> random_bytes(keylen_bytes, 0); |
@@ -31,7 +32,8 @@ Status GenerateSecretKeyOpenSsl(const blink::WebCryptoKeyAlgorithm& algorithm, |
return Status::OperationError(); |
} |
- *key = |
+ result->set_type(GenerateKeyResult::TYPE_SECRET_KEY); |
+ *result->mutable_secret_key() = |
blink::WebCryptoKey::create(new SymKeyOpenSsl(CryptoData(random_bytes)), |
blink::WebCryptoKeyTypeSecret, |
extractable, |