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

Unified Diff: crypto/ec_private_key.cc

Issue 2677583002: Fix non-noise cpplint errors in //crypto. (Closed)
Patch Set: fix p224_unittest.cc Created 3 years, 11 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/apple_keychain.h ('k') | crypto/ec_signature_creator_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_private_key.cc
diff --git a/crypto/ec_private_key.cc b/crypto/ec_private_key.cc
index 9914c5dde866e9f2e47b9a747ab7584cefff4d19..08fd75dec3c95f74bb381c082e8000dc7f02fa28 100644
--- a/crypto/ec_private_key.cc
+++ b/crypto/ec_private_key.cc
@@ -46,9 +46,9 @@ bool ExportKeyWithBio(const void* key,
if (!export_fn(bio.get(), key))
return false;
- char* data = nullptr;
- long len = BIO_get_mem_data(bio.get(), &data);
- if (!data || len < 0)
+ const uint8_t* data;
+ size_t len;
+ if (!BIO_mem_contents(bio.get(), &data, &len))
return false;
output->assign(data, data + len);
« no previous file with comments | « crypto/apple_keychain.h ('k') | crypto/ec_signature_creator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698