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

Unified Diff: crypto/ec_signature_creator_impl.cc

Issue 2095523002: Make //crypto factories return std::unique_ptr<>s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: I'm blind Created 4 years, 6 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_signature_creator.cc ('k') | crypto/encryptor.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 e80a7fbc09f70d05b384b96fbb6dc2f2c9b5cf8c..c22efdab4b476ce40ed19afff53c279b7e317d99 100644
--- a/crypto/ec_signature_creator_impl.cc
+++ b/crypto/ec_signature_creator_impl.cc
@@ -33,9 +33,10 @@ bool ECSignatureCreatorImpl::Sign(const uint8_t* data,
ScopedEVP_MD_CTX ctx(EVP_MD_CTX_create());
size_t sig_len = 0;
if (!ctx.get() ||
- !EVP_DigestSignInit(ctx.get(), NULL, EVP_sha256(), NULL, key_->key()) ||
+ !EVP_DigestSignInit(ctx.get(), nullptr, EVP_sha256(), nullptr,
+ key_->key()) ||
!EVP_DigestSignUpdate(ctx.get(), data, data_len) ||
- !EVP_DigestSignFinal(ctx.get(), NULL, &sig_len)) {
+ !EVP_DigestSignFinal(ctx.get(), nullptr, &sig_len)) {
return false;
}
@@ -43,9 +44,9 @@ bool ECSignatureCreatorImpl::Sign(const uint8_t* data,
if (!EVP_DigestSignFinal(ctx.get(), &signature->front(), &sig_len))
return false;
- // NOTE: A call to EVP_DigestSignFinal() with a NULL second parameter returns
- // a maximum allocation size, while the call without a NULL returns the real
- // one, which may be smaller.
+ // NOTE: A call to EVP_DigestSignFinal() with a nullptr second parameter
+ // returns a maximum allocation size, while the call without a nullptr
+ // returns the real one, which may be smaller.
signature->resize(sig_len);
return true;
}
« no previous file with comments | « crypto/ec_signature_creator.cc ('k') | crypto/encryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698