Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: crypto/ec_signature_creator_impl.cc

Issue 2332473002: Use new BoringSSL scopers in //crypto (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/ec_private_key.cc ('k') | crypto/openssl_bio_string_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_signature_creator_impl.cc
diff --git a/crypto/ec_signature_creator_impl.cc b/crypto/ec_signature_creator_impl.cc
index c22efdab4b476ce40ed19afff53c279b7e317d99..2870310dd1c0d30880412a0a05bd87ac978da063 100644
--- a/crypto/ec_signature_creator_impl.cc
+++ b/crypto/ec_signature_creator_impl.cc
@@ -15,7 +15,6 @@
#include "base/logging.h"
#include "crypto/ec_private_key.h"
#include "crypto/openssl_util.h"
-#include "crypto/scoped_openssl_types.h"
namespace crypto {
@@ -30,7 +29,7 @@ bool ECSignatureCreatorImpl::Sign(const uint8_t* data,
int data_len,
std::vector<uint8_t>* signature) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
- ScopedEVP_MD_CTX ctx(EVP_MD_CTX_create());
+ bssl::ScopedEVP_MD_CTX ctx;
size_t sig_len = 0;
if (!ctx.get() ||
!EVP_DigestSignInit(ctx.get(), nullptr, EVP_sha256(), nullptr,
@@ -56,7 +55,7 @@ bool ECSignatureCreatorImpl::DecodeSignature(
std::vector<uint8_t>* out_raw_sig) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
// Create ECDSA_SIG object from DER-encoded data.
- ScopedECDSA_SIG ecdsa_sig(
+ bssl::UniquePtr<ECDSA_SIG> ecdsa_sig(
ECDSA_SIG_from_bytes(der_sig.data(), der_sig.size()));
if (!ecdsa_sig.get())
return false;
« no previous file with comments | « crypto/ec_private_key.cc ('k') | crypto/openssl_bio_string_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698