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

Side by Side Diff: components/webcrypto/algorithms/ec.cc

Issue 2449873005: include boringssl headers from third_party explicitly (Closed)
Patch Set: rebase 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 #include <stddef.h>
2 #include <utility>
3
4 #include "base/logging.h"
davidben 2016/10/27 22:30:36 Er, it seems this file got rather messed up.
tfarina 2016/10/27 23:02:34 Er, still developing my emacs skills. Clearly some
1 // Copyright 2014 The Chromium Authors. All rights reserved. 5 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 6 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 7 // found in the LICENSE file.
4 8
5 #include "components/webcrypto/algorithms/ec.h" 9 #include "components/webcrypto/algorithms/ec.h"
6 10
7 #include <openssl/bn.h>
8 #include <openssl/bytestring.h>
9 #include <openssl/ec.h>
10 #include <openssl/ec_key.h>
11 #include <openssl/evp.h>
12 #include <openssl/mem.h>
13 #include <stddef.h>
14 #include <utility>
15
16 #include "base/logging.h"
17 #include "base/macros.h" 11 #include "base/macros.h"
18 #include "components/webcrypto/algorithms/asymmetric_key_util.h" 12 #include "components/webcrypto/algorithms/asymmetric_key_util.h"
19 #include "components/webcrypto/algorithms/util.h" 13 #include "components/webcrypto/algorithms/util.h"
20 #include "components/webcrypto/blink_key_handle.h" 14 #include "components/webcrypto/blink_key_handle.h"
21 #include "components/webcrypto/crypto_data.h" 15 #include "components/webcrypto/crypto_data.h"
22 #include "components/webcrypto/generate_key_result.h" 16 #include "components/webcrypto/generate_key_result.h"
23 #include "components/webcrypto/jwk.h" 17 #include "components/webcrypto/jwk.h"
24 #include "components/webcrypto/status.h" 18 #include "components/webcrypto/status.h"
25 #include "crypto/openssl_util.h" 19 #include "crypto/openssl_util.h"
26 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" 20 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
27 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" 21 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h"
22 #include "third_party/boringssl/src/include/openssl/bn.h"
23 #include "third_party/boringssl/src/include/openssl/bytestring.h"
24 #include "third_party/boringssl/src/include/openssl/ec.h"
25 #include "third_party/boringssl/src/include/openssl/ec_key.h"
26 #include "third_party/boringssl/src/include/openssl/evp.h"
27 #include "third_party/boringssl/src/include/openssl/mem.h"
28 28
29 namespace webcrypto { 29 namespace webcrypto {
30 30
31 namespace { 31 namespace {
32 32
33 // Maps a blink::WebCryptoNamedCurve to the corresponding NID used by 33 // Maps a blink::WebCryptoNamedCurve to the corresponding NID used by
34 // BoringSSL. 34 // BoringSSL.
35 Status WebCryptoCurveToNid(blink::WebCryptoNamedCurve named_curve, int* nid) { 35 Status WebCryptoCurveToNid(blink::WebCryptoNamedCurve named_curve, int* nid) {
36 switch (named_curve) { 36 switch (named_curve) {
37 case blink::WebCryptoNamedCurveP256: 37 case blink::WebCryptoNamedCurveP256:
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 688
689 if (algorithm.ecParams()->namedCurve() != 689 if (algorithm.ecParams()->namedCurve() !=
690 key->algorithm().ecParams()->namedCurve()) { 690 key->algorithm().ecParams()->namedCurve()) {
691 return Status::ErrorUnexpected(); 691 return Status::ErrorUnexpected();
692 } 692 }
693 693
694 return Status::Success(); 694 return Status::Success();
695 } 695 }
696 696
697 } // namespace webcrypto 697 } // namespace webcrypto
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698