Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / components / webcrypto / webcrypto.gyp
blob8eed7711de34ff97388caebc8d4f0486b2202fd7
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
3 # found in the LICENSE file.
6   'targets': [
7     {
8       'target_name': 'webcrypto',
9       'type': 'static_library',
10       'dependencies': [
11         '../../base/base.gyp:base',
12         '../../crypto/crypto.gyp:crypto',
13         '../../third_party/WebKit/public/blink.gyp:blink',
14       ],
15       'include_dirs': [
16         '..',
17       ],
18       'variables': {
19         'webcrypto_sources': [
20           'algorithm_dispatch.cc',
21           'algorithm_dispatch.h',
22           'algorithm_implementation.cc',
23           'algorithm_implementation.h',
24           'algorithm_registry.cc',
25           'algorithm_registry.h',
26           'crypto_data.cc',
27           'crypto_data.h',
28           'generate_key_result.cc',
29           'generate_key_result.h',
30           'jwk.cc',
31           'jwk.h',
32           'platform_crypto.h',
33           'status.cc',
34           'status.h',
35           'webcrypto_impl.cc',
36           'webcrypto_impl.h',
37           'webcrypto_util.cc',
38           'webcrypto_util.h',
39         ],
40         'webcrypto_nss_sources': [
41           'nss/aes_algorithm_nss.cc',
42           'nss/aes_algorithm_nss.h',
43           'nss/aes_cbc_nss.cc',
44           'nss/aes_gcm_nss.cc',
45           'nss/aes_kw_nss.cc',
46           'nss/hmac_nss.cc',
47           'nss/key_nss.cc',
48           'nss/key_nss.h',
49           'nss/rsa_hashed_algorithm_nss.cc',
50           'nss/rsa_hashed_algorithm_nss.h',
51           'nss/rsa_oaep_nss.cc',
52           'nss/rsa_ssa_nss.cc',
53           'nss/sha_nss.cc',
54           'nss/sym_key_nss.cc',
55           'nss/sym_key_nss.h',
56           'nss/util_nss.cc',
57           'nss/util_nss.h',
58         ],
59         'webcrypto_openssl_sources': [
60           'openssl/aes_algorithm_openssl.cc',
61           'openssl/aes_algorithm_openssl.h',
62           'openssl/aes_cbc_openssl.cc',
63           'openssl/aes_ctr_openssl.cc',
64           'openssl/aes_gcm_openssl.cc',
65           'openssl/aes_kw_openssl.cc',
66           'openssl/ec_algorithm_openssl.cc',
67           'openssl/ec_algorithm_openssl.h',
68           'openssl/ecdh_openssl.cc',
69           'openssl/ecdsa_openssl.cc',
70           'openssl/hkdf_openssl.cc',
71           'openssl/hmac_openssl.cc',
72           'openssl/key_openssl.cc',
73           'openssl/key_openssl.h',
74           'openssl/pbkdf2_openssl.cc',
75           'openssl/rsa_hashed_algorithm_openssl.cc',
76           'openssl/rsa_hashed_algorithm_openssl.h',
77           'openssl/rsa_oaep_openssl.cc',
78           'openssl/rsa_pss_openssl.cc',
79           'openssl/rsa_sign_openssl.cc',
80           'openssl/rsa_sign_openssl.h',
81           'openssl/rsa_ssa_openssl.cc',
82           'openssl/sha_openssl.cc',
83           'openssl/util_openssl.cc',
84           'openssl/util_openssl.h',
85         ],
86       },
87       'sources': [
88         '<@(webcrypto_sources)',
89       ],
90       'conditions': [
91         ['use_openssl==1', {
92           'sources': [
93             '<@(webcrypto_openssl_sources)',
94           ],
95           'dependencies': [
96             '../../third_party/boringssl/boringssl.gyp:boringssl',
97           ],
98         }, {
99           'sources': [
100             '<@(webcrypto_nss_sources)',
101           ],
102           'conditions': [
103             ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
104               'dependencies': [
105                 '../../build/linux/system.gyp:ssl',
106               ],
107             }, {
108               'dependencies': [
109                 '../../third_party/nss/nss.gyp:nspr',
110                 '../../third_party/nss/nss.gyp:nss',
111               ],
112             }],
113           ],
114         }],
115       ],
116     },
117   ],