aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/s2n/ya.make
blob: 8de78874c1f52be5d6748843991a49c4c395527f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# Generated by devtools/yamaker from nixpkgs 22.11.

LIBRARY()

LICENSE(
    Apache-2.0 AND
    Brian-Gladman-3-Clause AND
    CC0-1.0 AND
    MIT AND
    Public-Domain
)

LICENSE_TEXTS(.yandex_meta/licenses.list.txt)

VERSION(1.3.54)

ORIGINAL_SOURCE(https://github.com/aws/s2n-tls/archive/v1.3.54.tar.gz)

PEERDIR(
    contrib/libs/openssl
)

ADDINCL(
    GLOBAL contrib/restricted/aws/s2n
    GLOBAL contrib/restricted/aws/s2n/api
)

NO_COMPILER_WARNINGS()

NO_RUNTIME()

CFLAGS(
    -DS2N_ATOMIC_SUPPORTED
    -DS2N_CLOEXEC_SUPPORTED
    -DS2N_CLOEXEC_XOPEN_SUPPORTED
    -DS2N_CLONE_SUPPORTED
    -DS2N_DIAGNOSTICS_POP_SUPPORTED
    -DS2N_DIAGNOSTICS_PUSH_SUPPORTED
    -DS2N_EXECINFO_AVAILABLE
    -DS2N_FALL_THROUGH_SUPPORTED
    -DS2N_KYBER512R3_AVX2_BMI2_SUPPORTED
    -DS2N_KYBER512R3_M256_INTRINSICS_SUPPORTED
    -DS2N_LIBCRYPTO_SUPPORTS_EVP_MD5_SHA1_HASH
    -DS2N_LIBCRYPTO_SUPPORTS_EVP_MD_CTX_SET_PKEY_CTX
    -DS2N_LIBCRYPTO_SUPPORTS_EVP_RC4
    -DS2N_LIBCRYPTO_SUPPORTS_FLAG_NO_CHECK_TIME
    -DS2N_MADVISE_SUPPORTED
    -DS2N___RESTRICT__SUPPORTED
)

IF (OS_LINUX)
    CFLAGS(
        -DS2N_FEATURES_AVAILABLE
        -DS2N_LINUX_SENDFILE
        -DS2N_KTLS_SUPPORTED
    )
ENDIF()

IF (NOT MUSL)
    CFLAGS(
        -DS2N_STACKTRACE
    )
ENDIF()

IF (ARCH_X86_64)
    CFLAGS(
        -DS2N_CPUID_AVAILABLE
        -DS2N_KYBER512R3_AVX2_BMI2
    )
    SRCS(
        pq-crypto/kyber_r3/kyber512r3_basemul_avx2.S
        pq-crypto/kyber_r3/kyber512r3_fq_avx2.S
        pq-crypto/kyber_r3/kyber512r3_invntt_avx2.S
        pq-crypto/kyber_r3/kyber512r3_ntt_avx2.S
        pq-crypto/kyber_r3/kyber512r3_shuffle_avx2.S
    )
    SRC_C_AVX2(pq-crypto/kyber_r3/KeccakP-1600-times4-SIMD256_avx2.c)
    SRC_C_AVX2(pq-crypto/kyber_r3/kyber512r3_cbd_avx2.c)
    SRC_C_AVX2(pq-crypto/kyber_r3/kyber512r3_consts_avx2.c)
    SRC_C_AVX2(pq-crypto/kyber_r3/kyber512r3_fips202x4_avx2.c)
    SRC_C_AVX2(pq-crypto/kyber_r3/kyber512r3_indcpa_avx2.c)
    SRC_C_AVX2(pq-crypto/kyber_r3/kyber512r3_poly_avx2.c)
    SRC_C_AVX2(pq-crypto/kyber_r3/kyber512r3_polyvec_avx2.c)
    SRC_C_AVX2(pq-crypto/kyber_r3/kyber512r3_rejsample_avx2.c)
ENDIF()

SRCS(
    crypto/s2n_aead_cipher_aes_gcm.c
    crypto/s2n_aead_cipher_chacha20_poly1305.c
    crypto/s2n_cbc_cipher_3des.c
    crypto/s2n_cbc_cipher_aes.c
    crypto/s2n_certificate.c
    crypto/s2n_cipher.c
    crypto/s2n_composite_cipher_aes_sha.c
    crypto/s2n_crypto.c
    crypto/s2n_dhe.c
    crypto/s2n_drbg.c
    crypto/s2n_ecc_evp.c
    crypto/s2n_ecdsa.c
    crypto/s2n_evp.c
    crypto/s2n_evp_signing.c
    crypto/s2n_fips.c
    crypto/s2n_hash.c
    crypto/s2n_hkdf.c
    crypto/s2n_hmac.c
    crypto/s2n_libcrypto.c
    crypto/s2n_locking.c
    crypto/s2n_openssl_x509.c
    crypto/s2n_pkey.c
    crypto/s2n_rsa.c
    crypto/s2n_rsa_pss.c
    crypto/s2n_rsa_signing.c
    crypto/s2n_sequence.c
    crypto/s2n_stream_cipher_null.c
    crypto/s2n_stream_cipher_rc4.c
    crypto/s2n_tls13_keys.c
    error/s2n_errno.c
    pq-crypto/kyber_r3/kyber512r3_cbd.c
    pq-crypto/kyber_r3/kyber512r3_fips202.c
    pq-crypto/kyber_r3/kyber512r3_indcpa.c
    pq-crypto/kyber_r3/kyber512r3_kem.c
    pq-crypto/kyber_r3/kyber512r3_ntt.c
    pq-crypto/kyber_r3/kyber512r3_poly.c
    pq-crypto/kyber_r3/kyber512r3_polyvec.c
    pq-crypto/kyber_r3/kyber512r3_reduce.c
    pq-crypto/kyber_r3/kyber512r3_symmetric-shake.c
    pq-crypto/s2n_kyber_evp.c
    pq-crypto/s2n_pq.c
    pq-crypto/s2n_pq_random.c
    stuffer/s2n_stuffer.c
    stuffer/s2n_stuffer_base64.c
    stuffer/s2n_stuffer_file.c
    stuffer/s2n_stuffer_network_order.c
    stuffer/s2n_stuffer_pem.c
    stuffer/s2n_stuffer_text.c
    tls/extensions/s2n_cert_status.c
    tls/extensions/s2n_cert_status_response.c
    tls/extensions/s2n_client_alpn.c
    tls/extensions/s2n_client_cert_status_request.c
    tls/extensions/s2n_client_cookie.c
    tls/extensions/s2n_client_early_data_indication.c
    tls/extensions/s2n_client_ems.c
    tls/extensions/s2n_client_key_share.c
    tls/extensions/s2n_client_max_frag_len.c
    tls/extensions/s2n_client_pq_kem.c
    tls/extensions/s2n_client_psk.c
    tls/extensions/s2n_client_renegotiation_info.c
    tls/extensions/s2n_client_sct_list.c
    tls/extensions/s2n_client_server_name.c
    tls/extensions/s2n_client_session_ticket.c
    tls/extensions/s2n_client_signature_algorithms.c
    tls/extensions/s2n_client_supported_groups.c
    tls/extensions/s2n_client_supported_versions.c
    tls/extensions/s2n_ec_point_format.c
    tls/extensions/s2n_extension_list.c
    tls/extensions/s2n_extension_type.c
    tls/extensions/s2n_extension_type_lists.c
    tls/extensions/s2n_key_share.c
    tls/extensions/s2n_npn.c
    tls/extensions/s2n_nst_early_data_indication.c
    tls/extensions/s2n_psk_key_exchange_modes.c
    tls/extensions/s2n_quic_transport_params.c
    tls/extensions/s2n_server_alpn.c
    tls/extensions/s2n_server_cert_status_request.c
    tls/extensions/s2n_server_cookie.c
    tls/extensions/s2n_server_early_data_indication.c
    tls/extensions/s2n_server_ems.c
    tls/extensions/s2n_server_key_share.c
    tls/extensions/s2n_server_max_fragment_length.c
    tls/extensions/s2n_server_psk.c
    tls/extensions/s2n_server_renegotiation_info.c
    tls/extensions/s2n_server_sct_list.c
    tls/extensions/s2n_server_server_name.c
    tls/extensions/s2n_server_session_ticket.c
    tls/extensions/s2n_server_signature_algorithms.c
    tls/extensions/s2n_server_supported_versions.c
    tls/extensions/s2n_supported_versions.c
    tls/s2n_aead.c
    tls/s2n_alerts.c
    tls/s2n_async_pkey.c
    tls/s2n_auth_selection.c
    tls/s2n_cbc.c
    tls/s2n_change_cipher_spec.c
    tls/s2n_cipher_preferences.c
    tls/s2n_cipher_suites.c
    tls/s2n_client_cert.c
    tls/s2n_client_cert_verify.c
    tls/s2n_client_finished.c
    tls/s2n_client_hello.c
    tls/s2n_client_hello_request.c
    tls/s2n_client_key_exchange.c
    tls/s2n_config.c
    tls/s2n_connection.c
    tls/s2n_crl.c
    tls/s2n_crypto.c
    tls/s2n_early_data.c
    tls/s2n_early_data_io.c
    tls/s2n_ecc_preferences.c
    tls/s2n_encrypted_extensions.c
    tls/s2n_establish_session.c
    tls/s2n_fingerprint.c
    tls/s2n_handshake.c
    tls/s2n_handshake_hashes.c
    tls/s2n_handshake_io.c
    tls/s2n_handshake_transcript.c
    tls/s2n_handshake_type.c
    tls/s2n_kem.c
    tls/s2n_kem_preferences.c
    tls/s2n_kex.c
    tls/s2n_key_log.c
    tls/s2n_key_update.c
    tls/s2n_ktls.c
    tls/s2n_ktls_io.c
    tls/s2n_next_protocol.c
    tls/s2n_ocsp_stapling.c
    tls/s2n_post_handshake.c
    tls/s2n_prf.c
    tls/s2n_protocol_preferences.c
    tls/s2n_psk.c
    tls/s2n_quic_support.c
    tls/s2n_record_read.c
    tls/s2n_record_read_aead.c
    tls/s2n_record_read_cbc.c
    tls/s2n_record_read_composite.c
    tls/s2n_record_read_stream.c
    tls/s2n_record_write.c
    tls/s2n_recv.c
    tls/s2n_renegotiate.c
    tls/s2n_resume.c
    tls/s2n_security_policies.c
    tls/s2n_send.c
    tls/s2n_server_cert.c
    tls/s2n_server_cert_request.c
    tls/s2n_server_done.c
    tls/s2n_server_extensions.c
    tls/s2n_server_finished.c
    tls/s2n_server_hello.c
    tls/s2n_server_hello_retry.c
    tls/s2n_server_key_exchange.c
    tls/s2n_server_new_session_ticket.c
    tls/s2n_shutdown.c
    tls/s2n_signature_algorithms.c
    tls/s2n_signature_scheme.c
    tls/s2n_tls.c
    tls/s2n_tls13.c
    tls/s2n_tls13_certificate_verify.c
    tls/s2n_tls13_handshake.c
    tls/s2n_tls13_key_schedule.c
    tls/s2n_tls13_secrets.c
    tls/s2n_x509_validator.c
    utils/s2n_array.c
    utils/s2n_atomic.c
    utils/s2n_blob.c
    utils/s2n_ensure.c
    utils/s2n_fork_detection.c
    utils/s2n_init.c
    utils/s2n_io.c
    utils/s2n_map.c
    utils/s2n_mem.c
    utils/s2n_random.c
    utils/s2n_result.c
    utils/s2n_rfc5952.c
    utils/s2n_safety.c
    utils/s2n_set.c
    utils/s2n_socket.c
    utils/s2n_timer.c
)

END()