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

Unified Diff: crypto/rsa_private_key_openssl.cc

Issue 1539353003: Switch to standard integer types in crypto/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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/rsa_private_key_nss.cc ('k') | crypto/rsa_private_key_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/rsa_private_key_openssl.cc
diff --git a/crypto/rsa_private_key_openssl.cc b/crypto/rsa_private_key_openssl.cc
index 52a0a7a1815e820f69a54d953168f93b7bdd2ea4..f7fdd9d1d16298ed6eb44c5071901949c870c250 100644
--- a/crypto/rsa_private_key_openssl.cc
+++ b/crypto/rsa_private_key_openssl.cc
@@ -9,6 +9,7 @@
#include <openssl/evp.h>
#include <openssl/pkcs12.h>
#include <openssl/rsa.h>
+#include <stdint.h>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -30,7 +31,7 @@ using ExportFunction = int (*)(BIO*, EVP_PKEY*);
// Helper to export |key| into |output| via the specified ExportFunction.
bool ExportKey(EVP_PKEY* key,
ExportFunction export_fn,
- std::vector<uint8>* output) {
+ std::vector<uint8_t>* output) {
if (!key)
return false;
@@ -53,7 +54,7 @@ bool ExportKey(EVP_PKEY* key,
} // namespace
// static
-RSAPrivateKey* RSAPrivateKey::Create(uint16 num_bits) {
+RSAPrivateKey* RSAPrivateKey::Create(uint16_t num_bits) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
ScopedRSA rsa_key(RSA_new());
@@ -74,7 +75,7 @@ RSAPrivateKey* RSAPrivateKey::Create(uint16 num_bits) {
// static
RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
- const std::vector<uint8>& input) {
+ const std::vector<uint8_t>& input) {
if (input.empty())
return NULL;
@@ -127,11 +128,11 @@ RSAPrivateKey* RSAPrivateKey::Copy() const {
return copy.release();
}
-bool RSAPrivateKey::ExportPrivateKey(std::vector<uint8>* output) const {
+bool RSAPrivateKey::ExportPrivateKey(std::vector<uint8_t>* output) const {
return ExportKey(key_, i2d_PKCS8PrivateKeyInfo_bio, output);
}
-bool RSAPrivateKey::ExportPublicKey(std::vector<uint8>* output) const {
+bool RSAPrivateKey::ExportPublicKey(std::vector<uint8_t>* output) const {
return ExportKey(key_, i2d_PUBKEY_bio, output);
}
« no previous file with comments | « crypto/rsa_private_key_nss.cc ('k') | crypto/rsa_private_key_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698