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

Side by Side Diff: components/webcrypto/algorithms/aes_gcm.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <openssl/aead.h>
6 #include <stddef.h> 5 #include <stddef.h>
7 #include <stdint.h> 6 #include <stdint.h>
8 7
9 #include <vector> 8 #include <vector>
10 9
11 #include "base/logging.h" 10 #include "base/logging.h"
12 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
13 #include "base/stl_util.h" 12 #include "base/stl_util.h"
14 #include "components/webcrypto/algorithms/aes.h" 13 #include "components/webcrypto/algorithms/aes.h"
15 #include "components/webcrypto/algorithms/util.h" 14 #include "components/webcrypto/algorithms/util.h"
16 #include "components/webcrypto/blink_key_handle.h" 15 #include "components/webcrypto/blink_key_handle.h"
17 #include "components/webcrypto/crypto_data.h" 16 #include "components/webcrypto/crypto_data.h"
18 #include "components/webcrypto/status.h" 17 #include "components/webcrypto/status.h"
19 #include "crypto/openssl_util.h" 18 #include "crypto/openssl_util.h"
20 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" 19 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
20 #include "third_party/boringssl/src/include/openssl/aead.h"
21 21
22 namespace webcrypto { 22 namespace webcrypto {
23 23
24 namespace { 24 namespace {
25 25
26 const EVP_AEAD* GetAesGcmAlgorithmFromKeySize(size_t key_size_bytes) { 26 const EVP_AEAD* GetAesGcmAlgorithmFromKeySize(size_t key_size_bytes) {
27 switch (key_size_bytes) { 27 switch (key_size_bytes) {
28 case 16: 28 case 16:
29 return EVP_aead_aes_128_gcm(); 29 return EVP_aead_aes_128_gcm();
30 case 32: 30 case 32:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 }; 81 };
82 82
83 } // namespace 83 } // namespace
84 84
85 std::unique_ptr<AlgorithmImplementation> CreateAesGcmImplementation() { 85 std::unique_ptr<AlgorithmImplementation> CreateAesGcmImplementation() {
86 return base::WrapUnique(new AesGcmImplementation); 86 return base::WrapUnique(new AesGcmImplementation);
87 } 87 }
88 88
89 } // namespace webcrypto 89 } // namespace webcrypto
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698