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

Unified Diff: crypto/signature_creator_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/signature_creator_nss.cc ('k') | crypto/signature_creator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/signature_creator_openssl.cc
diff --git a/crypto/signature_creator_openssl.cc b/crypto/signature_creator_openssl.cc
index 3dc64cde904074d721d65e101e671f1dc11fd36c..d5fc4d4d7c918ebe36a7cedec66bc96431b4a169 100644
--- a/crypto/signature_creator_openssl.cc
+++ b/crypto/signature_creator_openssl.cc
@@ -6,6 +6,8 @@
#include <openssl/evp.h>
#include <openssl/rsa.h>
+#include <stddef.h>
+#include <stdint.h>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -59,9 +61,9 @@ SignatureCreator* SignatureCreator::Create(RSAPrivateKey* key,
// static
bool SignatureCreator::Sign(RSAPrivateKey* key,
HashAlgorithm hash_alg,
- const uint8* data,
+ const uint8_t* data,
int data_len,
- std::vector<uint8>* signature) {
+ std::vector<uint8_t>* signature) {
ScopedRSA rsa_key(EVP_PKEY_get1_RSA(key->key()));
if (!rsa_key)
return false;
@@ -85,12 +87,12 @@ SignatureCreator::~SignatureCreator() {
EVP_MD_CTX_destroy(sign_context_);
}
-bool SignatureCreator::Update(const uint8* data_part, int data_part_len) {
+bool SignatureCreator::Update(const uint8_t* data_part, int data_part_len) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
return !!EVP_DigestSignUpdate(sign_context_, data_part, data_part_len);
}
-bool SignatureCreator::Final(std::vector<uint8>* signature) {
+bool SignatureCreator::Final(std::vector<uint8_t>* signature) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
// Determine the maximum length of the signature.
« no previous file with comments | « crypto/signature_creator_nss.cc ('k') | crypto/signature_creator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698