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

Side by Side Diff: crypto/signature_creator.cc

Issue 2449873005: include boringssl headers from third_party explicitly (Closed)
Patch Set: review comments Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crypto/signature_creator.h" 5 #include "crypto/signature_creator.h"
6 6
7 #include <openssl/evp.h>
8 #include <openssl/rsa.h>
9 #include <stddef.h> 7 #include <stddef.h>
10 #include <stdint.h> 8 #include <stdint.h>
11 9
12 #include "base/logging.h" 10 #include "base/logging.h"
13 #include "crypto/openssl_util.h" 11 #include "crypto/openssl_util.h"
14 #include "crypto/rsa_private_key.h" 12 #include "crypto/rsa_private_key.h"
13 #include "third_party/boringssl/src/include/openssl/evp.h"
14 #include "third_party/boringssl/src/include/openssl/rsa.h"
15 15
16 namespace crypto { 16 namespace crypto {
17 17
18 namespace { 18 namespace {
19 19
20 const EVP_MD* ToOpenSSLDigest(SignatureCreator::HashAlgorithm hash_alg) { 20 const EVP_MD* ToOpenSSLDigest(SignatureCreator::HashAlgorithm hash_alg) {
21 switch (hash_alg) { 21 switch (hash_alg) {
22 case SignatureCreator::SHA1: 22 case SignatureCreator::SHA1:
23 return EVP_sha1(); 23 return EVP_sha1();
24 case SignatureCreator::SHA256: 24 case SignatureCreator::SHA256:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 signature->clear(); 103 signature->clear();
104 return false; 104 return false;
105 } 105 }
106 signature->resize(len); 106 signature->resize(len);
107 return true; 107 return true;
108 } 108 }
109 109
110 SignatureCreator::SignatureCreator() : sign_context_(EVP_MD_CTX_create()) {} 110 SignatureCreator::SignatureCreator() : sign_context_(EVP_MD_CTX_create()) {}
111 111
112 } // namespace crypto 112 } // namespace crypto
OLDNEW
« chrome/common/DEPS ('K') | « crypto/secure_hash.cc ('k') | crypto/signature_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698