summaryrefslogtreecommitdiffstats
path: root/content/child/webcrypto/platform_crypto_openssl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/child/webcrypto/platform_crypto_openssl.cc')
-rw-r--r--content/child/webcrypto/platform_crypto_openssl.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/content/child/webcrypto/platform_crypto_openssl.cc b/content/child/webcrypto/platform_crypto_openssl.cc
index 1235e51f..0dfaac0 100644
--- a/content/child/webcrypto/platform_crypto_openssl.cc
+++ b/content/child/webcrypto/platform_crypto_openssl.cc
@@ -167,7 +167,7 @@ class DigestorOpenSSL : public blink::WebCryptoDigestor {
}
Status ConsumeWithStatus(const unsigned char* data, unsigned int size) {
- crypto::OpenSSLErrStackTracer(FROM_HERE);
+ crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
Status error = Init();
if (!error.IsSuccess())
return error;
@@ -215,7 +215,7 @@ class DigestorOpenSSL : public blink::WebCryptoDigestor {
}
Status FinishInternal(unsigned char* result, unsigned int* result_size) {
- crypto::OpenSSLErrStackTracer(FROM_HERE);
+ crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
Status error = Init();
if (!error.IsSuccess())
return error;
@@ -279,7 +279,7 @@ Status GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm,
if (keylen_bytes == 0)
return Status::ErrorGenerateKeyLength();
- crypto::OpenSSLErrStackTracer(FROM_HERE);
+ crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
std::vector<unsigned char> random_bytes(keylen_bytes, 0);
if (!(RAND_bytes(&random_bytes[0], keylen_bytes)))
@@ -335,6 +335,8 @@ Status SignHmac(SymKey* key,
const blink::WebCryptoAlgorithm& hash,
const CryptoData& data,
std::vector<uint8>* buffer) {
+ crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
+
const EVP_MD* digest_algorithm = GetDigest(hash.id());
if (!digest_algorithm)
return Status::ErrorUnsupported();
@@ -354,8 +356,6 @@ Status SignHmac(SymKey* key,
crypto::ScopedOpenSSLSafeSizeBuffer<EVP_MAX_MD_SIZE> hmac_result(
Uint8VectorStart(buffer), hmac_expected_length);
- crypto::OpenSSLErrStackTracer(FROM_HERE);
-
unsigned int hmac_actual_length;
unsigned char* const success = HMAC(digest_algorithm,
raw_key_voidp,