Kenny Root | b849459 | 2015-09-25 02:29:14 +0000 | [diff] [blame] | 1 | include_directories(../include) |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 2 | |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 3 | if(NOT OPENSSL_NO_ASM) |
| 4 | if(UNIX) |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 5 | if(${ARCH} STREQUAL "aarch64") |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 6 | # The "armx" Perl scripts look for "64" in the style argument |
| 7 | # in order to decide whether to generate 32- or 64-bit asm. |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 8 | if(APPLE) |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 9 | set(PERLASM_STYLE ios64) |
| 10 | else() |
| 11 | set(PERLASM_STYLE linux64) |
| 12 | endif() |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 13 | elseif(${ARCH} STREQUAL "arm") |
| 14 | if(APPLE) |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 15 | set(PERLASM_STYLE ios32) |
| 16 | else() |
| 17 | set(PERLASM_STYLE linux32) |
| 18 | endif() |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 19 | elseif(${ARCH} STREQUAL "ppc64le") |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 20 | set(PERLASM_STYLE linux64le) |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 21 | else() |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 22 | if(${ARCH} STREQUAL "x86") |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 23 | set(PERLASM_FLAGS "-fPIC -DOPENSSL_IA32_SSE2") |
| 24 | endif() |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 25 | if(APPLE) |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 26 | set(PERLASM_STYLE macosx) |
| 27 | else() |
| 28 | set(PERLASM_STYLE elf) |
| 29 | endif() |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 30 | endif() |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 31 | set(ASM_EXT S) |
| 32 | enable_language(ASM) |
| 33 | set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack") |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 34 | |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 35 | # Clang's integerated assembler does not support debug symbols. |
| 36 | if(NOT CMAKE_ASM_COMPILER_ID MATCHES "Clang") |
| 37 | set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,-g") |
| 38 | endif() |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 39 | |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 40 | # CMake does not add -isysroot and -arch flags to assembly. |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 41 | if(APPLE) |
| 42 | if(CMAKE_OSX_SYSROOT) |
Robert Sloan | ae1abf9 | 2017-10-05 12:50:08 -0700 | [diff] [blame] | 43 | set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -isysroot \"${CMAKE_OSX_SYSROOT}\"") |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 44 | endif() |
| 45 | foreach(arch ${CMAKE_OSX_ARCHITECTURES}) |
| 46 | set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -arch ${arch}") |
| 47 | endforeach() |
| 48 | endif() |
| 49 | else() |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 50 | if(${ARCH} STREQUAL "x86_64") |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 51 | set(PERLASM_STYLE nasm) |
| 52 | else() |
| 53 | set(PERLASM_STYLE win32n) |
| 54 | set(PERLASM_FLAGS "-DOPENSSL_IA32_SSE2") |
| 55 | endif() |
Robert Sloan | 6e8c959 | 2018-12-03 11:20:49 -0800 | [diff] [blame] | 56 | set(CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS} -gcv8") |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 57 | |
| 58 | # On Windows, we use the NASM output, specifically built with Yasm. |
| 59 | set(ASM_EXT asm) |
| 60 | enable_language(ASM_NASM) |
| 61 | endif() |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 62 | endif() |
| 63 | |
| 64 | function(perlasm dest src) |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 65 | get_filename_component(dir ${dest} DIRECTORY) |
| 66 | if ("${dir}" STREQUAL "") |
| 67 | set(dir ".") |
| 68 | endif() |
| 69 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 70 | add_custom_command( |
| 71 | OUTPUT ${dest} |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 72 | COMMAND ${CMAKE_COMMAND} -E make_directory ${dir} |
David Benjamin | c895d6b | 2016-08-11 13:26:41 -0400 | [diff] [blame] | 73 | COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${PERLASM_FLAGS} ${ARGN} ${dest} |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 74 | DEPENDS |
| 75 | ${src} |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 76 | ${PROJECT_SOURCE_DIR}/crypto/perlasm/arm-xlate.pl |
Steven Valdez | bb1ceac | 2016-10-07 10:34:51 -0400 | [diff] [blame] | 77 | ${PROJECT_SOURCE_DIR}/crypto/perlasm/ppc-xlate.pl |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 78 | ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl |
| 79 | ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl |
| 80 | ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl |
| 81 | ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86masm.pl |
| 82 | ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86nasm.pl |
| 83 | WORKING_DIRECTORY . |
| 84 | ) |
| 85 | endfunction() |
| 86 | |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 87 | add_subdirectory(fipsmodule) |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 88 | add_subdirectory(test) |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 89 | |
Srinivas Paladugu | dd42a61 | 2019-08-09 19:30:39 +0000 | [diff] [blame^] | 90 | if(FIPS_DELOCATE) |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 91 | SET_SOURCE_FILES_PROPERTIES(fipsmodule/bcm.o PROPERTIES EXTERNAL_OBJECT true) |
| 92 | SET_SOURCE_FILES_PROPERTIES(fipsmodule/bcm.o PROPERTIES GENERATED true) |
| 93 | |
| 94 | set( |
| 95 | CRYPTO_FIPS_OBJECTS |
| 96 | |
| 97 | fipsmodule/bcm.o |
| 98 | ) |
| 99 | endif() |
| 100 | |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 101 | if(${ARCH} STREQUAL "arm") |
| 102 | set( |
| 103 | CRYPTO_ARCH_SOURCES |
| 104 | |
| 105 | chacha/chacha-armv4.${ASM_EXT} |
| 106 | curve25519/asm/x25519-asm-arm.S |
| 107 | poly1305/poly1305_arm_asm.S |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 108 | test/trampoline-armv4.${ASM_EXT} |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 109 | ) |
| 110 | endif() |
| 111 | |
| 112 | if(${ARCH} STREQUAL "aarch64") |
| 113 | set( |
| 114 | CRYPTO_ARCH_SOURCES |
| 115 | |
| 116 | chacha/chacha-armv8.${ASM_EXT} |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 117 | test/trampoline-armv8.${ASM_EXT} |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 118 | ) |
| 119 | endif() |
| 120 | |
| 121 | if(${ARCH} STREQUAL "x86") |
| 122 | set( |
| 123 | CRYPTO_ARCH_SOURCES |
| 124 | |
| 125 | chacha/chacha-x86.${ASM_EXT} |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 126 | test/trampoline-x86.${ASM_EXT} |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 127 | ) |
| 128 | endif() |
| 129 | |
| 130 | if(${ARCH} STREQUAL "x86_64") |
| 131 | set( |
| 132 | CRYPTO_ARCH_SOURCES |
| 133 | |
| 134 | chacha/chacha-x86_64.${ASM_EXT} |
| 135 | cipher_extra/aes128gcmsiv-x86_64.${ASM_EXT} |
| 136 | cipher_extra/chacha20_poly1305_x86_64.${ASM_EXT} |
Robert Sloan | 11c28bd | 2018-12-17 12:09:20 -0800 | [diff] [blame] | 137 | hrss/asm/poly_rq_mul.S |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 138 | test/trampoline-x86_64.${ASM_EXT} |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 139 | ) |
| 140 | endif() |
| 141 | |
| 142 | perlasm(chacha/chacha-armv4.${ASM_EXT} chacha/asm/chacha-armv4.pl) |
| 143 | perlasm(chacha/chacha-armv8.${ASM_EXT} chacha/asm/chacha-armv8.pl) |
| 144 | perlasm(chacha/chacha-x86.${ASM_EXT} chacha/asm/chacha-x86.pl) |
| 145 | perlasm(chacha/chacha-x86_64.${ASM_EXT} chacha/asm/chacha-x86_64.pl) |
| 146 | perlasm(cipher_extra/aes128gcmsiv-x86_64.${ASM_EXT} cipher_extra/asm/aes128gcmsiv-x86_64.pl) |
| 147 | perlasm(cipher_extra/chacha20_poly1305_x86_64.${ASM_EXT} cipher_extra/asm/chacha20_poly1305_x86_64.pl) |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 148 | perlasm(test/trampoline-armv4.${ASM_EXT} test/asm/trampoline-armv4.pl) |
| 149 | perlasm(test/trampoline-armv8.${ASM_EXT} test/asm/trampoline-armv8.pl) |
| 150 | perlasm(test/trampoline-x86.${ASM_EXT} test/asm/trampoline-x86.pl) |
| 151 | perlasm(test/trampoline-x86_64.${ASM_EXT} test/asm/trampoline-x86_64.pl) |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 152 | |
| 153 | add_custom_command( |
| 154 | OUTPUT err_data.c |
| 155 | COMMAND ${GO_EXECUTABLE} run err_data_generate.go > ${CMAKE_CURRENT_BINARY_DIR}/err_data.c |
| 156 | DEPENDS |
| 157 | err/err_data_generate.go |
| 158 | err/asn1.errordata |
| 159 | err/bio.errordata |
| 160 | err/bn.errordata |
| 161 | err/cipher.errordata |
| 162 | err/conf.errordata |
| 163 | err/dh.errordata |
| 164 | err/digest.errordata |
| 165 | err/dsa.errordata |
| 166 | err/ecdh.errordata |
| 167 | err/ecdsa.errordata |
| 168 | err/ec.errordata |
| 169 | err/engine.errordata |
| 170 | err/evp.errordata |
| 171 | err/hkdf.errordata |
| 172 | err/obj.errordata |
| 173 | err/pem.errordata |
| 174 | err/pkcs7.errordata |
| 175 | err/pkcs8.errordata |
| 176 | err/rsa.errordata |
| 177 | err/ssl.errordata |
| 178 | err/x509.errordata |
| 179 | err/x509v3.errordata |
| 180 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/err |
| 181 | ) |
| 182 | |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 183 | add_library( |
| 184 | crypto |
| 185 | |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 186 | asn1/a_bitstr.c |
| 187 | asn1/a_bool.c |
| 188 | asn1/a_d2i_fp.c |
| 189 | asn1/a_dup.c |
| 190 | asn1/a_enum.c |
| 191 | asn1/a_gentm.c |
| 192 | asn1/a_i2d_fp.c |
| 193 | asn1/a_int.c |
| 194 | asn1/a_mbstr.c |
| 195 | asn1/a_object.c |
| 196 | asn1/a_octet.c |
| 197 | asn1/a_print.c |
| 198 | asn1/a_strnid.c |
| 199 | asn1/a_time.c |
| 200 | asn1/a_type.c |
| 201 | asn1/a_utctm.c |
| 202 | asn1/a_utf8.c |
| 203 | asn1/asn1_lib.c |
| 204 | asn1/asn1_par.c |
| 205 | asn1/asn_pack.c |
| 206 | asn1/f_enum.c |
| 207 | asn1/f_int.c |
| 208 | asn1/f_string.c |
| 209 | asn1/tasn_dec.c |
| 210 | asn1/tasn_enc.c |
| 211 | asn1/tasn_fre.c |
| 212 | asn1/tasn_new.c |
| 213 | asn1/tasn_typ.c |
| 214 | asn1/tasn_utl.c |
| 215 | asn1/time_support.c |
| 216 | base64/base64.c |
| 217 | bio/bio.c |
| 218 | bio/bio_mem.c |
| 219 | bio/connect.c |
| 220 | bio/fd.c |
| 221 | bio/file.c |
| 222 | bio/hexdump.c |
| 223 | bio/pair.c |
| 224 | bio/printf.c |
| 225 | bio/socket.c |
| 226 | bio/socket_helper.c |
| 227 | bn_extra/bn_asn1.c |
| 228 | bn_extra/convert.c |
| 229 | buf/buf.c |
| 230 | bytestring/asn1_compat.c |
| 231 | bytestring/ber.c |
| 232 | bytestring/cbb.c |
| 233 | bytestring/cbs.c |
| 234 | bytestring/unicode.c |
| 235 | chacha/chacha.c |
| 236 | cipher_extra/cipher_extra.c |
| 237 | cipher_extra/derive_key.c |
| 238 | cipher_extra/e_aesccm.c |
| 239 | cipher_extra/e_aesctrhmac.c |
| 240 | cipher_extra/e_aesgcmsiv.c |
| 241 | cipher_extra/e_chacha20poly1305.c |
| 242 | cipher_extra/e_null.c |
| 243 | cipher_extra/e_rc2.c |
| 244 | cipher_extra/e_rc4.c |
| 245 | cipher_extra/e_tls.c |
| 246 | cipher_extra/tls_cbc.c |
| 247 | cmac/cmac.c |
| 248 | conf/conf.c |
| 249 | cpu-aarch64-fuchsia.c |
| 250 | cpu-aarch64-linux.c |
| 251 | cpu-arm-linux.c |
| 252 | cpu-arm.c |
| 253 | cpu-intel.c |
| 254 | cpu-ppc64le.c |
| 255 | crypto.c |
| 256 | curve25519/spake25519.c |
| 257 | dh/dh.c |
| 258 | dh/params.c |
| 259 | dh/check.c |
| 260 | dh/dh_asn1.c |
| 261 | digest_extra/digest_extra.c |
| 262 | dsa/dsa.c |
| 263 | dsa/dsa_asn1.c |
| 264 | ecdh_extra/ecdh_extra.c |
| 265 | ecdsa_extra/ecdsa_asn1.c |
| 266 | ec_extra/ec_asn1.c |
| 267 | err/err.c |
| 268 | err_data.c |
| 269 | engine/engine.c |
| 270 | evp/digestsign.c |
| 271 | evp/evp.c |
| 272 | evp/evp_asn1.c |
| 273 | evp/evp_ctx.c |
| 274 | evp/p_dsa_asn1.c |
| 275 | evp/p_ec.c |
| 276 | evp/p_ec_asn1.c |
| 277 | evp/p_ed25519.c |
| 278 | evp/p_ed25519_asn1.c |
| 279 | evp/p_rsa.c |
| 280 | evp/p_rsa_asn1.c |
| 281 | evp/pbkdf.c |
| 282 | evp/print.c |
| 283 | evp/scrypt.c |
| 284 | evp/sign.c |
| 285 | ex_data.c |
| 286 | hkdf/hkdf.c |
Robert Sloan | 11c28bd | 2018-12-17 12:09:20 -0800 | [diff] [blame] | 287 | hrss/hrss.c |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 288 | lhash/lhash.c |
| 289 | mem.c |
| 290 | obj/obj.c |
| 291 | obj/obj_xref.c |
| 292 | pem/pem_all.c |
| 293 | pem/pem_info.c |
| 294 | pem/pem_lib.c |
| 295 | pem/pem_oth.c |
| 296 | pem/pem_pk8.c |
| 297 | pem/pem_pkey.c |
| 298 | pem/pem_x509.c |
| 299 | pem/pem_xaux.c |
| 300 | pkcs7/pkcs7.c |
| 301 | pkcs7/pkcs7_x509.c |
| 302 | pkcs8/pkcs8.c |
| 303 | pkcs8/pkcs8_x509.c |
| 304 | pkcs8/p5_pbev2.c |
| 305 | poly1305/poly1305.c |
| 306 | poly1305/poly1305_arm.c |
| 307 | poly1305/poly1305_vec.c |
| 308 | pool/pool.c |
| 309 | rand_extra/deterministic.c |
| 310 | rand_extra/forkunsafe.c |
| 311 | rand_extra/fuchsia.c |
| 312 | rand_extra/rand_extra.c |
| 313 | rand_extra/windows.c |
| 314 | rc4/rc4.c |
| 315 | refcount_c11.c |
| 316 | refcount_lock.c |
| 317 | rsa_extra/rsa_asn1.c |
| 318 | rsa_extra/rsa_print.c |
| 319 | stack/stack.c |
| 320 | thread.c |
| 321 | thread_none.c |
| 322 | thread_pthread.c |
| 323 | thread_win.c |
| 324 | x509/a_digest.c |
| 325 | x509/a_sign.c |
| 326 | x509/a_strex.c |
| 327 | x509/a_verify.c |
| 328 | x509/algorithm.c |
| 329 | x509/asn1_gen.c |
| 330 | x509/by_dir.c |
| 331 | x509/by_file.c |
| 332 | x509/i2d_pr.c |
| 333 | x509/rsa_pss.c |
| 334 | x509/t_crl.c |
| 335 | x509/t_req.c |
| 336 | x509/t_x509.c |
| 337 | x509/t_x509a.c |
| 338 | x509/x509.c |
| 339 | x509/x509_att.c |
| 340 | x509/x509_cmp.c |
| 341 | x509/x509_d2.c |
| 342 | x509/x509_def.c |
| 343 | x509/x509_ext.c |
| 344 | x509/x509_lu.c |
| 345 | x509/x509_obj.c |
| 346 | x509/x509_r2x.c |
| 347 | x509/x509_req.c |
| 348 | x509/x509_set.c |
| 349 | x509/x509_trs.c |
| 350 | x509/x509_txt.c |
| 351 | x509/x509_v3.c |
| 352 | x509/x509_vfy.c |
| 353 | x509/x509_vpm.c |
| 354 | x509/x509cset.c |
| 355 | x509/x509name.c |
| 356 | x509/x509rset.c |
| 357 | x509/x509spki.c |
| 358 | x509/x_algor.c |
| 359 | x509/x_all.c |
| 360 | x509/x_attrib.c |
| 361 | x509/x_crl.c |
| 362 | x509/x_exten.c |
| 363 | x509/x_info.c |
| 364 | x509/x_name.c |
| 365 | x509/x_pkey.c |
| 366 | x509/x_pubkey.c |
| 367 | x509/x_req.c |
| 368 | x509/x_sig.c |
| 369 | x509/x_spki.c |
| 370 | x509/x_val.c |
| 371 | x509/x_x509.c |
| 372 | x509/x_x509a.c |
| 373 | x509v3/pcy_cache.c |
| 374 | x509v3/pcy_data.c |
| 375 | x509v3/pcy_lib.c |
| 376 | x509v3/pcy_map.c |
| 377 | x509v3/pcy_node.c |
| 378 | x509v3/pcy_tree.c |
| 379 | x509v3/v3_akey.c |
| 380 | x509v3/v3_akeya.c |
| 381 | x509v3/v3_alt.c |
| 382 | x509v3/v3_bcons.c |
| 383 | x509v3/v3_bitst.c |
| 384 | x509v3/v3_conf.c |
| 385 | x509v3/v3_cpols.c |
| 386 | x509v3/v3_crld.c |
| 387 | x509v3/v3_enum.c |
| 388 | x509v3/v3_extku.c |
| 389 | x509v3/v3_genn.c |
| 390 | x509v3/v3_ia5.c |
| 391 | x509v3/v3_info.c |
| 392 | x509v3/v3_int.c |
| 393 | x509v3/v3_lib.c |
| 394 | x509v3/v3_ncons.c |
| 395 | x509v3/v3_ocsp.c |
| 396 | x509v3/v3_pci.c |
| 397 | x509v3/v3_pcia.c |
| 398 | x509v3/v3_pcons.c |
| 399 | x509v3/v3_pku.c |
| 400 | x509v3/v3_pmaps.c |
| 401 | x509v3/v3_prn.c |
| 402 | x509v3/v3_purp.c |
| 403 | x509v3/v3_skey.c |
| 404 | x509v3/v3_sxnet.c |
| 405 | x509v3/v3_utl.c |
| 406 | ../third_party/fiat/curve25519.c |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 407 | |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 408 | $<TARGET_OBJECTS:fipsmodule> |
| 409 | |
| 410 | ${CRYPTO_ARCH_SOURCES} |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 411 | ${CRYPTO_FIPS_OBJECTS} |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 412 | ) |
| 413 | |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 414 | add_dependencies(crypto global_target) |
| 415 | |
Srinivas Paladugu | dd42a61 | 2019-08-09 19:30:39 +0000 | [diff] [blame^] | 416 | if(FIPS_DELOCATE) |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 417 | add_dependencies(crypto bcm_o_target) |
| 418 | endif() |
| 419 | |
| 420 | SET_TARGET_PROPERTIES(crypto PROPERTIES LINKER_LANGUAGE C) |
| 421 | |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 422 | if(NOT MSVC AND NOT ANDROID) |
| 423 | target_link_libraries(crypto pthread) |
| 424 | endif() |
| 425 | |
Adam Vartanian | bfcf3a7 | 2018-08-10 14:55:24 +0100 | [diff] [blame] | 426 | # Every target depends on crypto, so we add libcxx as a dependency here to |
| 427 | # simplify injecting it everywhere. |
| 428 | if(USE_CUSTOM_LIBCXX) |
| 429 | target_link_libraries(crypto libcxx) |
| 430 | endif() |
| 431 | |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 432 | add_executable( |
| 433 | crypto_test |
| 434 | |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 435 | abi_self_test.cc |
Robert Sloan | 8ecb7cd | 2017-03-21 09:39:01 -0700 | [diff] [blame] | 436 | asn1/asn1_test.cc |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 437 | base64/base64_test.cc |
Robert Sloan | 921ef2c | 2017-10-17 09:02:20 -0700 | [diff] [blame] | 438 | buf/buf_test.cc |
Robert Sloan | 6d0d00e | 2017-03-27 07:13:07 -0700 | [diff] [blame] | 439 | bio/bio_test.cc |
Robert Sloan | 572a4e2 | 2017-04-17 10:52:19 -0700 | [diff] [blame] | 440 | bytestring/bytestring_test.cc |
Robert Sloan | a94fe05 | 2017-02-21 08:49:28 -0800 | [diff] [blame] | 441 | chacha/chacha_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 442 | cipher_extra/aead_test.cc |
| 443 | cipher_extra/cipher_test.cc |
Robert Sloan | 2424d84 | 2017-05-01 07:46:28 -0700 | [diff] [blame] | 444 | cmac/cmac_test.cc |
Robert Sloan | 9254e68 | 2017-04-24 09:42:06 -0700 | [diff] [blame] | 445 | compiler_test.cc |
Robert Sloan | 6d0d00e | 2017-03-27 07:13:07 -0700 | [diff] [blame] | 446 | constant_time_test.cc |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 447 | cpu-arm-linux_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 448 | curve25519/ed25519_test.cc |
Robert Sloan | 2424d84 | 2017-05-01 07:46:28 -0700 | [diff] [blame] | 449 | curve25519/spake25519_test.cc |
Robert Sloan | 7d422bc | 2017-03-06 10:04:29 -0800 | [diff] [blame] | 450 | curve25519/x25519_test.cc |
Adam Vartanian | bfcf3a7 | 2018-08-10 14:55:24 +0100 | [diff] [blame] | 451 | ecdh_extra/ecdh_test.cc |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 452 | dh/dh_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 453 | digest_extra/digest_test.cc |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 454 | dsa/dsa_test.cc |
Robert Sloan | 5d62578 | 2017-02-13 09:55:39 -0800 | [diff] [blame] | 455 | err/err_test.cc |
Robert Sloan | 7d422bc | 2017-03-06 10:04:29 -0800 | [diff] [blame] | 456 | evp/evp_extra_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 457 | evp/evp_test.cc |
| 458 | evp/pbkdf_test.cc |
| 459 | evp/scrypt_test.cc |
| 460 | fipsmodule/aes/aes_test.cc |
| 461 | fipsmodule/bn/bn_test.cc |
| 462 | fipsmodule/ec/ec_test.cc |
| 463 | fipsmodule/ec/p256-x86_64_test.cc |
| 464 | fipsmodule/ecdsa/ecdsa_test.cc |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 465 | fipsmodule/md5/md5_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 466 | fipsmodule/modes/gcm_test.cc |
Robert Sloan | 9254e68 | 2017-04-24 09:42:06 -0700 | [diff] [blame] | 467 | fipsmodule/rand/ctrdrbg_test.cc |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 468 | fipsmodule/sha/sha_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 469 | hkdf/hkdf_test.cc |
| 470 | hmac_extra/hmac_test.cc |
Robert Sloan | 11c28bd | 2018-12-17 12:09:20 -0800 | [diff] [blame] | 471 | hrss/hrss_test.cc |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 472 | impl_dispatch_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 473 | lhash/lhash_test.cc |
| 474 | obj/obj_test.cc |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 475 | pem/pem_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 476 | pkcs7/pkcs7_test.cc |
| 477 | pkcs8/pkcs8_test.cc |
| 478 | pkcs8/pkcs12_test.cc |
| 479 | poly1305/poly1305_test.cc |
| 480 | pool/pool_test.cc |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 481 | rand_extra/rand_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 482 | refcount_test.cc |
| 483 | rsa_extra/rsa_test.cc |
Robert Sloan | 978112c | 2018-01-22 12:53:01 -0800 | [diff] [blame] | 484 | self_test.cc |
Robert Sloan | f068def | 2018-10-10 18:45:40 -0700 | [diff] [blame] | 485 | stack/stack_test.cc |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 486 | test/file_test_gtest.cc |
| 487 | thread_test.cc |
| 488 | x509/x509_test.cc |
Adam Vartanian | bfcf3a7 | 2018-08-10 14:55:24 +0100 | [diff] [blame] | 489 | x509/x509_time_test.cc |
Robert Sloan | a12bf46 | 2017-07-17 07:08:26 -0700 | [diff] [blame] | 490 | x509v3/tab_test.cc |
| 491 | x509v3/v3name_test.cc |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 492 | |
Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame] | 493 | $<TARGET_OBJECTS:crypto_test_data> |
Robert Sloan | a450c92 | 2018-01-08 10:35:32 -0800 | [diff] [blame] | 494 | $<TARGET_OBJECTS:boringssl_gtest_main> |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 495 | ) |
| 496 | |
Robert Sloan | 726e9d1 | 2018-09-11 11:45:04 -0700 | [diff] [blame] | 497 | add_dependencies(crypto_test global_target) |
| 498 | |
Robert Sloan | 4c22c5f | 2019-03-01 15:53:37 -0800 | [diff] [blame] | 499 | target_link_libraries(crypto_test test_support_lib boringssl_gtest crypto) |
Robert Sloan | d9e572d | 2018-08-27 12:27:00 -0700 | [diff] [blame] | 500 | if(WIN32) |
Robert Sloan | 6d0d00e | 2017-03-27 07:13:07 -0700 | [diff] [blame] | 501 | target_link_libraries(crypto_test ws2_32) |
| 502 | endif() |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 503 | add_dependencies(all_tests crypto_test) |