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

Side by Side Diff: crypto/signature_verifier_openssl.cc

Issue 1312203002: Include BoringSSL headers from third_party/ in crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « crypto/signature_creator_openssl.cc ('k') | crypto/symmetric_key_openssl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_verifier.h" 5 #include "crypto/signature_verifier.h"
6 6
7 #include <openssl/evp.h>
8 #include <openssl/x509.h>
9
10 #include <vector> 7 #include <vector>
11 8
12 #include "base/logging.h" 9 #include "base/logging.h"
13 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
14 #include "base/stl_util.h" 11 #include "base/stl_util.h"
15 #include "crypto/openssl_util.h" 12 #include "crypto/openssl_util.h"
16 #include "crypto/scoped_openssl_types.h" 13 #include "crypto/scoped_openssl_types.h"
14 #include "third_party/boringssl/src/include/openssl/digest.h"
15 #include "third_party/boringssl/src/include/openssl/evp.h"
16 #include "third_party/boringssl/src/include/openssl/obj.h"
17 #include "third_party/boringssl/src/include/openssl/x509.h"
17 18
18 namespace crypto { 19 namespace crypto {
19 20
20 namespace { 21 namespace {
21 22
22 const EVP_MD* ToOpenSSLDigest(SignatureVerifier::HashAlgorithm hash_alg) { 23 const EVP_MD* ToOpenSSLDigest(SignatureVerifier::HashAlgorithm hash_alg) {
23 switch (hash_alg) { 24 switch (hash_alg) {
24 case SignatureVerifier::SHA1: 25 case SignatureVerifier::SHA1:
25 return EVP_sha1(); 26 return EVP_sha1();
26 case SignatureVerifier::SHA256: 27 case SignatureVerifier::SHA256:
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 return rv == 1; 152 return rv == 1;
152 } 153 }
153 154
154 void SignatureVerifier::Reset() { 155 void SignatureVerifier::Reset() {
155 delete verify_context_; 156 delete verify_context_;
156 verify_context_ = NULL; 157 verify_context_ = NULL;
157 signature_.clear(); 158 signature_.clear();
158 } 159 }
159 160
160 } // namespace crypto 161 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/signature_creator_openssl.cc ('k') | crypto/symmetric_key_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698