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

Side by Side Diff: crypto/aead_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/DEPS ('k') | crypto/ec_private_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/aead_openssl.h" 5 #include "crypto/aead_openssl.h"
6 6
7 #if defined(USE_OPENSSL) 7 #if defined(USE_OPENSSL)
8 8
9 #include <openssl/aes.h>
10 #include <openssl/evp.h>
11 #include <string> 9 #include <string>
12 10
13 #include "base/basictypes.h" 11 #include "base/basictypes.h"
14 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
15 #include "crypto/openssl_util.h" 13 #include "crypto/openssl_util.h"
14 #include "third_party/boringssl/src/include/openssl/aead.h"
16 15
17 namespace crypto { 16 namespace crypto {
18 17
19 Aead::Aead(AeadAlgorithm algorithm) : key_(nullptr) { 18 Aead::Aead(AeadAlgorithm algorithm) : key_(nullptr) {
20 EnsureOpenSSLInit(); 19 EnsureOpenSSLInit();
21 switch (algorithm) { 20 switch (algorithm) {
22 case AES_128_CTR_HMAC_SHA256: 21 case AES_128_CTR_HMAC_SHA256:
23 aead_ = EVP_aead_aes_128_ctr_hmac_sha256(); 22 aead_ = EVP_aead_aes_128_ctr_hmac_sha256();
24 break; 23 break;
25 } 24 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return EVP_AEAD_key_length(aead_); 115 return EVP_AEAD_key_length(aead_);
117 } 116 }
118 117
119 size_t Aead::NonceLength() const { 118 size_t Aead::NonceLength() const {
120 return EVP_AEAD_nonce_length(aead_); 119 return EVP_AEAD_nonce_length(aead_);
121 } 120 }
122 121
123 } // namespace 122 } // namespace
124 123
125 #endif 124 #endif
OLDNEW
« no previous file with comments | « crypto/DEPS ('k') | crypto/ec_private_key_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698