OLD | NEW |
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/evp.h> | |
6 #include <openssl/mem.h> | |
7 #include <openssl/rsa.h> | |
8 #include <stddef.h> | 5 #include <stddef.h> |
9 #include <stdint.h> | 6 #include <stdint.h> |
10 #include <string.h> | 7 #include <string.h> |
11 | 8 |
12 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
13 #include "components/webcrypto/algorithms/rsa.h" | 10 #include "components/webcrypto/algorithms/rsa.h" |
14 #include "components/webcrypto/algorithms/util.h" | 11 #include "components/webcrypto/algorithms/util.h" |
15 #include "components/webcrypto/blink_key_handle.h" | 12 #include "components/webcrypto/blink_key_handle.h" |
16 #include "components/webcrypto/crypto_data.h" | 13 #include "components/webcrypto/crypto_data.h" |
17 #include "components/webcrypto/status.h" | 14 #include "components/webcrypto/status.h" |
18 #include "crypto/openssl_util.h" | 15 #include "crypto/openssl_util.h" |
19 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 16 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
20 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" | 17 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" |
| 18 #include "third_party/boringssl/src/include/openssl/evp.h" |
| 19 #include "third_party/boringssl/src/include/openssl/mem.h" |
| 20 #include "third_party/boringssl/src/include/openssl/rsa.h" |
21 | 21 |
22 namespace webcrypto { | 22 namespace webcrypto { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 typedef int (*InitFunc)(EVP_PKEY_CTX* ctx); | 26 typedef int (*InitFunc)(EVP_PKEY_CTX* ctx); |
27 typedef int (*EncryptDecryptFunc)(EVP_PKEY_CTX* ctx, | 27 typedef int (*EncryptDecryptFunc)(EVP_PKEY_CTX* ctx, |
28 unsigned char* out, | 28 unsigned char* out, |
29 size_t* outlen, | 29 size_t* outlen, |
30 const unsigned char* in, | 30 const unsigned char* in, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 140 } |
141 }; | 141 }; |
142 | 142 |
143 } // namespace | 143 } // namespace |
144 | 144 |
145 std::unique_ptr<AlgorithmImplementation> CreateRsaOaepImplementation() { | 145 std::unique_ptr<AlgorithmImplementation> CreateRsaOaepImplementation() { |
146 return base::WrapUnique(new RsaOaepImplementation); | 146 return base::WrapUnique(new RsaOaepImplementation); |
147 } | 147 } |
148 | 148 |
149 } // namespace webcrypto | 149 } // namespace webcrypto |
OLD | NEW |