| Index: components/webcrypto/algorithms/aes_cbc.cc
|
| diff --git a/components/webcrypto/algorithms/aes_cbc.cc b/components/webcrypto/algorithms/aes_cbc.cc
|
| index 6bd6fab90bc1f9eeeafb183b5f4c601ef6a161d1..057ee7285560ec351674d409f9bba08633d5ef1b 100644
|
| --- a/components/webcrypto/algorithms/aes_cbc.cc
|
| +++ b/components/webcrypto/algorithms/aes_cbc.cc
|
| @@ -3,7 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include <openssl/aes.h>
|
| -#include <openssl/evp.h>
|
| +#include <openssl/cipher.h>
|
| #include <stddef.h>
|
| #include <stdint.h>
|
|
|
| @@ -16,7 +16,6 @@
|
| #include "components/webcrypto/crypto_data.h"
|
| #include "components/webcrypto/status.h"
|
| #include "crypto/openssl_util.h"
|
| -#include "crypto/scoped_openssl_types.h"
|
| #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
|
|
|
| namespace webcrypto {
|
| @@ -63,15 +62,10 @@ Status AesCbcEncryptDecrypt(EncryptOrDecrypt cipher_operation,
|
| return Status::ErrorDataTooLarge();
|
|
|
| // Note: PKCS padding is enabled by default
|
| - crypto::ScopedOpenSSL<EVP_CIPHER_CTX, EVP_CIPHER_CTX_free> context(
|
| - EVP_CIPHER_CTX_new());
|
| -
|
| - if (!context.get())
|
| - return Status::OperationError();
|
| -
|
| const EVP_CIPHER* const cipher = GetAESCipherByKeyLength(raw_key.size());
|
| DCHECK(cipher);
|
|
|
| + bssl::ScopedEVP_CIPHER_CTX context;
|
| if (!EVP_CipherInit_ex(context.get(), cipher, NULL, &raw_key[0],
|
| params->iv().data(), cipher_operation)) {
|
| return Status::OperationError();
|
|
|