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

Side by Side Diff: crypto/ec_signature_creator_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/ec_private_key_openssl.cc ('k') | crypto/encryptor_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) 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/ec_signature_creator_impl.h" 5 #include "crypto/ec_signature_creator_impl.h"
6 6
7 #include <openssl/bn.h>
8 #include <openssl/ec.h>
9 #include <openssl/ecdsa.h>
10 #include <openssl/evp.h>
11 #include <openssl/sha.h>
12
13 #include "base/logging.h" 7 #include "base/logging.h"
14 #include "crypto/ec_private_key.h" 8 #include "crypto/ec_private_key.h"
15 #include "crypto/openssl_util.h" 9 #include "crypto/openssl_util.h"
16 #include "crypto/scoped_openssl_types.h" 10 #include "crypto/scoped_openssl_types.h"
11 #include "third_party/boringssl/src/include/openssl/bn.h"
12 #include "third_party/boringssl/src/include/openssl/digest.h"
13 #include "third_party/boringssl/src/include/openssl/ecdsa.h"
14 #include "third_party/boringssl/src/include/openssl/evp.h"
17 15
18 namespace crypto { 16 namespace crypto {
19 17
20 ECSignatureCreatorImpl::ECSignatureCreatorImpl(ECPrivateKey* key) 18 ECSignatureCreatorImpl::ECSignatureCreatorImpl(ECPrivateKey* key)
21 : key_(key) { 19 : key_(key) {
22 EnsureOpenSSLInit(); 20 EnsureOpenSSLInit();
23 } 21 }
24 22
25 ECSignatureCreatorImpl::~ECSignatureCreatorImpl() {} 23 ECSignatureCreatorImpl::~ECSignatureCreatorImpl() {}
26 24
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (!BN_bn2bin_padded(&result[0], kMaxBytesPerBN, ecdsa_sig->r) || 63 if (!BN_bn2bin_padded(&result[0], kMaxBytesPerBN, ecdsa_sig->r) ||
66 !BN_bn2bin_padded(&result[kMaxBytesPerBN], kMaxBytesPerBN, 64 !BN_bn2bin_padded(&result[kMaxBytesPerBN], kMaxBytesPerBN,
67 ecdsa_sig->s)) { 65 ecdsa_sig->s)) {
68 return false; 66 return false;
69 } 67 }
70 out_raw_sig->swap(result); 68 out_raw_sig->swap(result);
71 return true; 69 return true;
72 } 70 }
73 71
74 } // namespace crypto 72 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/ec_private_key_openssl.cc ('k') | crypto/encryptor_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698