From 82d8a9332e704e4bdb3071e3d8945efbd22e73f6 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 27 Nov 2024 11:09:03 +0000 Subject: [PATCH] Update CMake --- Sources/CCryptoBoringSSL/CMakeLists.txt | 499 ++++++++++++------------ Sources/_CryptoExtras/CMakeLists.txt | 8 + scripts/update-cmake-lists.sh | 4 +- 3 files changed, 260 insertions(+), 251 deletions(-) diff --git a/Sources/CCryptoBoringSSL/CMakeLists.txt b/Sources/CCryptoBoringSSL/CMakeLists.txt index f61d310b..79e11767 100644 --- a/Sources/CCryptoBoringSSL/CMakeLists.txt +++ b/Sources/CCryptoBoringSSL/CMakeLists.txt @@ -13,255 +13,256 @@ ##===----------------------------------------------------------------------===## add_library(CCryptoBoringSSL STATIC - "crypto/asn1/a_bitstr.c" - "crypto/asn1/a_bool.c" - "crypto/asn1/a_d2i_fp.c" - "crypto/asn1/a_dup.c" - "crypto/asn1/a_gentm.c" - "crypto/asn1/a_i2d_fp.c" - "crypto/asn1/a_int.c" - "crypto/asn1/a_mbstr.c" - "crypto/asn1/a_object.c" - "crypto/asn1/a_octet.c" - "crypto/asn1/a_strex.c" - "crypto/asn1/a_strnid.c" - "crypto/asn1/a_time.c" - "crypto/asn1/a_type.c" - "crypto/asn1/a_utctm.c" - "crypto/asn1/asn1_lib.c" - "crypto/asn1/asn1_par.c" - "crypto/asn1/asn_pack.c" - "crypto/asn1/f_int.c" - "crypto/asn1/f_string.c" - "crypto/asn1/posix_time.c" - "crypto/asn1/tasn_dec.c" - "crypto/asn1/tasn_enc.c" - "crypto/asn1/tasn_fre.c" - "crypto/asn1/tasn_new.c" - "crypto/asn1/tasn_typ.c" - "crypto/asn1/tasn_utl.c" - "crypto/base64/base64.c" - "crypto/bio/bio.c" - "crypto/bio/bio_mem.c" - "crypto/bio/connect.c" - "crypto/bio/errno.c" - "crypto/bio/fd.c" - "crypto/bio/file.c" - "crypto/bio/hexdump.c" - "crypto/bio/pair.c" - "crypto/bio/printf.c" - "crypto/bio/socket.c" - "crypto/bio/socket_helper.c" - "crypto/blake2/blake2.c" - "crypto/bn_extra/bn_asn1.c" - "crypto/bn_extra/convert.c" - "crypto/buf/buf.c" - "crypto/bytestring/asn1_compat.c" - "crypto/bytestring/ber.c" - "crypto/bytestring/cbb.c" - "crypto/bytestring/cbs.c" - "crypto/bytestring/unicode.c" - "crypto/chacha/chacha.c" - "crypto/cipher_extra/cipher_extra.c" - "crypto/cipher_extra/derive_key.c" - "crypto/cipher_extra/e_aesctrhmac.c" - "crypto/cipher_extra/e_aesgcmsiv.c" - "crypto/cipher_extra/e_chacha20poly1305.c" - "crypto/cipher_extra/e_des.c" - "crypto/cipher_extra/e_null.c" - "crypto/cipher_extra/e_rc2.c" - "crypto/cipher_extra/e_rc4.c" - "crypto/cipher_extra/e_tls.c" - "crypto/cipher_extra/tls_cbc.c" - "crypto/conf/conf.c" - "crypto/cpu_aarch64_apple.c" - "crypto/cpu_aarch64_fuchsia.c" - "crypto/cpu_aarch64_linux.c" - "crypto/cpu_aarch64_openbsd.c" - "crypto/cpu_aarch64_sysreg.c" - "crypto/cpu_aarch64_win.c" - "crypto/cpu_arm_freebsd.c" - "crypto/cpu_arm_linux.c" - "crypto/cpu_intel.c" - "crypto/crypto.c" - "crypto/curve25519/curve25519.c" - "crypto/curve25519/curve25519_64_adx.c" - "crypto/curve25519/spake25519.c" - "crypto/des/des.c" - "crypto/dh_extra/dh_asn1.c" - "crypto/dh_extra/params.c" - "crypto/digest_extra/digest_extra.c" - "crypto/dilithium/dilithium.c" - "crypto/dsa/dsa.c" - "crypto/dsa/dsa_asn1.c" - "crypto/ec_extra/ec_asn1.c" - "crypto/ec_extra/ec_derive.c" - "crypto/ec_extra/hash_to_curve.c" - "crypto/ecdh_extra/ecdh_extra.c" - "crypto/ecdsa_extra/ecdsa_asn1.c" - "crypto/engine/engine.c" - "crypto/err/err.c" - "crypto/evp/evp.c" - "crypto/evp/evp_asn1.c" - "crypto/evp/evp_ctx.c" - "crypto/evp/p_dh.c" - "crypto/evp/p_dh_asn1.c" - "crypto/evp/p_dsa_asn1.c" - "crypto/evp/p_ec.c" - "crypto/evp/p_ec_asn1.c" - "crypto/evp/p_ed25519.c" - "crypto/evp/p_ed25519_asn1.c" - "crypto/evp/p_hkdf.c" - "crypto/evp/p_rsa.c" - "crypto/evp/p_rsa_asn1.c" - "crypto/evp/p_x25519.c" - "crypto/evp/p_x25519_asn1.c" - "crypto/evp/pbkdf.c" - "crypto/evp/print.c" - "crypto/evp/scrypt.c" - "crypto/evp/sign.c" - "crypto/ex_data.c" - "crypto/fipsmodule/bcm.c" - "crypto/fipsmodule/fips_shared_support.c" - "crypto/hpke/hpke.c" - "crypto/hrss/hrss.c" - "crypto/keccak/keccak.c" - "crypto/kyber/kyber.c" - "crypto/lhash/lhash.c" - "crypto/md4/md4.c" - "crypto/md5/md5.c" - "crypto/mem.c" - "crypto/mldsa/mldsa.c" - "crypto/obj/obj.c" - "crypto/obj/obj_xref.c" - "crypto/pem/pem_all.c" - "crypto/pem/pem_info.c" - "crypto/pem/pem_lib.c" - "crypto/pem/pem_oth.c" - "crypto/pem/pem_pk8.c" - "crypto/pem/pem_pkey.c" - "crypto/pem/pem_x509.c" - "crypto/pem/pem_xaux.c" - "crypto/pkcs7/pkcs7.c" - "crypto/pkcs7/pkcs7_x509.c" - "crypto/pkcs8/p5_pbev2.c" - "crypto/pkcs8/pkcs8.c" - "crypto/pkcs8/pkcs8_x509.c" - "crypto/poly1305/poly1305.c" - "crypto/poly1305/poly1305_arm.c" - "crypto/poly1305/poly1305_vec.c" - "crypto/pool/pool.c" - "crypto/rand_extra/deterministic.c" - "crypto/rand_extra/fork_detect.c" - "crypto/rand_extra/forkunsafe.c" - "crypto/rand_extra/getentropy.c" - "crypto/rand_extra/ios.c" - "crypto/rand_extra/passive.c" - "crypto/rand_extra/rand_extra.c" - "crypto/rand_extra/trusty.c" - "crypto/rand_extra/urandom.c" - "crypto/rand_extra/windows.c" - "crypto/rc4/rc4.c" - "crypto/refcount.c" - "crypto/rsa_extra/rsa_asn1.c" - "crypto/rsa_extra/rsa_crypt.c" - "crypto/rsa_extra/rsa_extra.c" - "crypto/rsa_extra/rsa_print.c" - "crypto/sha/sha1.c" - "crypto/sha/sha256.c" - "crypto/sha/sha512.c" - "crypto/siphash/siphash.c" - "crypto/slhdsa/fors.c" - "crypto/slhdsa/merkle.c" - "crypto/slhdsa/slhdsa.c" - "crypto/slhdsa/thash.c" - "crypto/slhdsa/wots.c" - "crypto/spx/spx.c" - "crypto/spx/spx_address.c" - "crypto/spx/spx_fors.c" - "crypto/spx/spx_merkle.c" - "crypto/spx/spx_thash.c" - "crypto/spx/spx_util.c" - "crypto/spx/spx_wots.c" - "crypto/stack/stack.c" - "crypto/thread.c" - "crypto/thread_none.c" - "crypto/thread_pthread.c" - "crypto/thread_win.c" - "crypto/trust_token/pmbtoken.c" - "crypto/trust_token/trust_token.c" - "crypto/trust_token/voprf.c" - "crypto/x509/a_digest.c" - "crypto/x509/a_sign.c" - "crypto/x509/a_verify.c" - "crypto/x509/algorithm.c" - "crypto/x509/asn1_gen.c" - "crypto/x509/by_dir.c" - "crypto/x509/by_file.c" - "crypto/x509/i2d_pr.c" - "crypto/x509/name_print.c" - "crypto/x509/policy.c" - "crypto/x509/rsa_pss.c" - "crypto/x509/t_crl.c" - "crypto/x509/t_req.c" - "crypto/x509/t_x509.c" - "crypto/x509/t_x509a.c" - "crypto/x509/v3_akey.c" - "crypto/x509/v3_akeya.c" - "crypto/x509/v3_alt.c" - "crypto/x509/v3_bcons.c" - "crypto/x509/v3_bitst.c" - "crypto/x509/v3_conf.c" - "crypto/x509/v3_cpols.c" - "crypto/x509/v3_crld.c" - "crypto/x509/v3_enum.c" - "crypto/x509/v3_extku.c" - "crypto/x509/v3_genn.c" - "crypto/x509/v3_ia5.c" - "crypto/x509/v3_info.c" - "crypto/x509/v3_int.c" - "crypto/x509/v3_lib.c" - "crypto/x509/v3_ncons.c" - "crypto/x509/v3_ocsp.c" - "crypto/x509/v3_pcons.c" - "crypto/x509/v3_pmaps.c" - "crypto/x509/v3_prn.c" - "crypto/x509/v3_purp.c" - "crypto/x509/v3_skey.c" - "crypto/x509/v3_utl.c" - "crypto/x509/x509.c" - "crypto/x509/x509_att.c" - "crypto/x509/x509_cmp.c" - "crypto/x509/x509_d2.c" - "crypto/x509/x509_def.c" - "crypto/x509/x509_ext.c" - "crypto/x509/x509_lu.c" - "crypto/x509/x509_obj.c" - "crypto/x509/x509_req.c" - "crypto/x509/x509_set.c" - "crypto/x509/x509_trs.c" - "crypto/x509/x509_txt.c" - "crypto/x509/x509_v3.c" - "crypto/x509/x509_vfy.c" - "crypto/x509/x509_vpm.c" - "crypto/x509/x509cset.c" - "crypto/x509/x509name.c" - "crypto/x509/x509rset.c" - "crypto/x509/x509spki.c" - "crypto/x509/x_algor.c" - "crypto/x509/x_all.c" - "crypto/x509/x_attrib.c" - "crypto/x509/x_crl.c" - "crypto/x509/x_exten.c" - "crypto/x509/x_name.c" - "crypto/x509/x_pubkey.c" - "crypto/x509/x_req.c" - "crypto/x509/x_sig.c" - "crypto/x509/x_spki.c" - "crypto/x509/x_val.c" - "crypto/x509/x_x509.c" - "crypto/x509/x_x509a.c" - "gen/crypto/err_data.c") + "crypto/asn1/a_bitstr.cc" + "crypto/asn1/a_bool.cc" + "crypto/asn1/a_d2i_fp.cc" + "crypto/asn1/a_dup.cc" + "crypto/asn1/a_gentm.cc" + "crypto/asn1/a_i2d_fp.cc" + "crypto/asn1/a_int.cc" + "crypto/asn1/a_mbstr.cc" + "crypto/asn1/a_object.cc" + "crypto/asn1/a_octet.cc" + "crypto/asn1/a_strex.cc" + "crypto/asn1/a_strnid.cc" + "crypto/asn1/a_time.cc" + "crypto/asn1/a_type.cc" + "crypto/asn1/a_utctm.cc" + "crypto/asn1/asn1_lib.cc" + "crypto/asn1/asn1_par.cc" + "crypto/asn1/asn_pack.cc" + "crypto/asn1/f_int.cc" + "crypto/asn1/f_string.cc" + "crypto/asn1/posix_time.cc" + "crypto/asn1/tasn_dec.cc" + "crypto/asn1/tasn_enc.cc" + "crypto/asn1/tasn_fre.cc" + "crypto/asn1/tasn_new.cc" + "crypto/asn1/tasn_typ.cc" + "crypto/asn1/tasn_utl.cc" + "crypto/base64/base64.cc" + "crypto/bio/bio.cc" + "crypto/bio/bio_mem.cc" + "crypto/bio/connect.cc" + "crypto/bio/errno.cc" + "crypto/bio/fd.cc" + "crypto/bio/file.cc" + "crypto/bio/hexdump.cc" + "crypto/bio/pair.cc" + "crypto/bio/printf.cc" + "crypto/bio/socket.cc" + "crypto/bio/socket_helper.cc" + "crypto/blake2/blake2.cc" + "crypto/bn_extra/bn_asn1.cc" + "crypto/bn_extra/convert.cc" + "crypto/buf/buf.cc" + "crypto/bytestring/asn1_compat.cc" + "crypto/bytestring/ber.cc" + "crypto/bytestring/cbb.cc" + "crypto/bytestring/cbs.cc" + "crypto/bytestring/unicode.cc" + "crypto/chacha/chacha.cc" + "crypto/cipher_extra/cipher_extra.cc" + "crypto/cipher_extra/derive_key.cc" + "crypto/cipher_extra/e_aesctrhmac.cc" + "crypto/cipher_extra/e_aesgcmsiv.cc" + "crypto/cipher_extra/e_chacha20poly1305.cc" + "crypto/cipher_extra/e_des.cc" + "crypto/cipher_extra/e_null.cc" + "crypto/cipher_extra/e_rc2.cc" + "crypto/cipher_extra/e_rc4.cc" + "crypto/cipher_extra/e_tls.cc" + "crypto/cipher_extra/tls_cbc.cc" + "crypto/conf/conf.cc" + "crypto/cpu_aarch64_apple.cc" + "crypto/cpu_aarch64_fuchsia.cc" + "crypto/cpu_aarch64_linux.cc" + "crypto/cpu_aarch64_openbsd.cc" + "crypto/cpu_aarch64_sysreg.cc" + "crypto/cpu_aarch64_win.cc" + "crypto/cpu_arm_freebsd.cc" + "crypto/cpu_arm_linux.cc" + "crypto/cpu_intel.cc" + "crypto/crypto.cc" + "crypto/curve25519/curve25519.cc" + "crypto/curve25519/curve25519_64_adx.cc" + "crypto/curve25519/spake25519.cc" + "crypto/des/des.cc" + "crypto/dh_extra/dh_asn1.cc" + "crypto/dh_extra/params.cc" + "crypto/digest_extra/digest_extra.cc" + "crypto/dilithium/dilithium.cc" + "crypto/dsa/dsa.cc" + "crypto/dsa/dsa_asn1.cc" + "crypto/ec_extra/ec_asn1.cc" + "crypto/ec_extra/ec_derive.cc" + "crypto/ec_extra/hash_to_curve.cc" + "crypto/ecdh_extra/ecdh_extra.cc" + "crypto/ecdsa_extra/ecdsa_asn1.cc" + "crypto/engine/engine.cc" + "crypto/err/err.cc" + "crypto/evp/evp.cc" + "crypto/evp/evp_asn1.cc" + "crypto/evp/evp_ctx.cc" + "crypto/evp/p_dh.cc" + "crypto/evp/p_dh_asn1.cc" + "crypto/evp/p_dsa_asn1.cc" + "crypto/evp/p_ec.cc" + "crypto/evp/p_ec_asn1.cc" + "crypto/evp/p_ed25519.cc" + "crypto/evp/p_ed25519_asn1.cc" + "crypto/evp/p_hkdf.cc" + "crypto/evp/p_rsa.cc" + "crypto/evp/p_rsa_asn1.cc" + "crypto/evp/p_x25519.cc" + "crypto/evp/p_x25519_asn1.cc" + "crypto/evp/pbkdf.cc" + "crypto/evp/print.cc" + "crypto/evp/scrypt.cc" + "crypto/evp/sign.cc" + "crypto/ex_data.cc" + "crypto/fipsmodule/bcm.cc" + "crypto/fipsmodule/fips_shared_support.cc" + "crypto/hpke/hpke.cc" + "crypto/hrss/hrss.cc" + "crypto/keccak/keccak.cc" + "crypto/kyber/kyber.cc" + "crypto/lhash/lhash.cc" + "crypto/md4/md4.cc" + "crypto/md5/md5.cc" + "crypto/mem.cc" + "crypto/mldsa/mldsa.cc" + "crypto/mlkem/mlkem.cc" + "crypto/obj/obj.cc" + "crypto/obj/obj_xref.cc" + "crypto/pem/pem_all.cc" + "crypto/pem/pem_info.cc" + "crypto/pem/pem_lib.cc" + "crypto/pem/pem_oth.cc" + "crypto/pem/pem_pk8.cc" + "crypto/pem/pem_pkey.cc" + "crypto/pem/pem_x509.cc" + "crypto/pem/pem_xaux.cc" + "crypto/pkcs7/pkcs7.cc" + "crypto/pkcs7/pkcs7_x509.cc" + "crypto/pkcs8/p5_pbev2.cc" + "crypto/pkcs8/pkcs8.cc" + "crypto/pkcs8/pkcs8_x509.cc" + "crypto/poly1305/poly1305.cc" + "crypto/poly1305/poly1305_arm.cc" + "crypto/poly1305/poly1305_vec.cc" + "crypto/pool/pool.cc" + "crypto/rand_extra/deterministic.cc" + "crypto/rand_extra/fork_detect.cc" + "crypto/rand_extra/forkunsafe.cc" + "crypto/rand_extra/getentropy.cc" + "crypto/rand_extra/ios.cc" + "crypto/rand_extra/passive.cc" + "crypto/rand_extra/rand_extra.cc" + "crypto/rand_extra/trusty.cc" + "crypto/rand_extra/urandom.cc" + "crypto/rand_extra/windows.cc" + "crypto/rc4/rc4.cc" + "crypto/refcount.cc" + "crypto/rsa_extra/rsa_asn1.cc" + "crypto/rsa_extra/rsa_crypt.cc" + "crypto/rsa_extra/rsa_extra.cc" + "crypto/rsa_extra/rsa_print.cc" + "crypto/sha/sha1.cc" + "crypto/sha/sha256.cc" + "crypto/sha/sha512.cc" + "crypto/siphash/siphash.cc" + "crypto/slhdsa/fors.cc" + "crypto/slhdsa/merkle.cc" + "crypto/slhdsa/slhdsa.cc" + "crypto/slhdsa/thash.cc" + "crypto/slhdsa/wots.cc" + "crypto/spx/spx.cc" + "crypto/spx/spx_address.cc" + "crypto/spx/spx_fors.cc" + "crypto/spx/spx_merkle.cc" + "crypto/spx/spx_thash.cc" + "crypto/spx/spx_util.cc" + "crypto/spx/spx_wots.cc" + "crypto/stack/stack.cc" + "crypto/thread.cc" + "crypto/thread_none.cc" + "crypto/thread_pthread.cc" + "crypto/thread_win.cc" + "crypto/trust_token/pmbtoken.cc" + "crypto/trust_token/trust_token.cc" + "crypto/trust_token/voprf.cc" + "crypto/x509/a_digest.cc" + "crypto/x509/a_sign.cc" + "crypto/x509/a_verify.cc" + "crypto/x509/algorithm.cc" + "crypto/x509/asn1_gen.cc" + "crypto/x509/by_dir.cc" + "crypto/x509/by_file.cc" + "crypto/x509/i2d_pr.cc" + "crypto/x509/name_print.cc" + "crypto/x509/policy.cc" + "crypto/x509/rsa_pss.cc" + "crypto/x509/t_crl.cc" + "crypto/x509/t_req.cc" + "crypto/x509/t_x509.cc" + "crypto/x509/t_x509a.cc" + "crypto/x509/v3_akey.cc" + "crypto/x509/v3_akeya.cc" + "crypto/x509/v3_alt.cc" + "crypto/x509/v3_bcons.cc" + "crypto/x509/v3_bitst.cc" + "crypto/x509/v3_conf.cc" + "crypto/x509/v3_cpols.cc" + "crypto/x509/v3_crld.cc" + "crypto/x509/v3_enum.cc" + "crypto/x509/v3_extku.cc" + "crypto/x509/v3_genn.cc" + "crypto/x509/v3_ia5.cc" + "crypto/x509/v3_info.cc" + "crypto/x509/v3_int.cc" + "crypto/x509/v3_lib.cc" + "crypto/x509/v3_ncons.cc" + "crypto/x509/v3_ocsp.cc" + "crypto/x509/v3_pcons.cc" + "crypto/x509/v3_pmaps.cc" + "crypto/x509/v3_prn.cc" + "crypto/x509/v3_purp.cc" + "crypto/x509/v3_skey.cc" + "crypto/x509/v3_utl.cc" + "crypto/x509/x509.cc" + "crypto/x509/x509_att.cc" + "crypto/x509/x509_cmp.cc" + "crypto/x509/x509_d2.cc" + "crypto/x509/x509_def.cc" + "crypto/x509/x509_ext.cc" + "crypto/x509/x509_lu.cc" + "crypto/x509/x509_obj.cc" + "crypto/x509/x509_req.cc" + "crypto/x509/x509_set.cc" + "crypto/x509/x509_trs.cc" + "crypto/x509/x509_txt.cc" + "crypto/x509/x509_v3.cc" + "crypto/x509/x509_vfy.cc" + "crypto/x509/x509_vpm.cc" + "crypto/x509/x509cset.cc" + "crypto/x509/x509name.cc" + "crypto/x509/x509rset.cc" + "crypto/x509/x509spki.cc" + "crypto/x509/x_algor.cc" + "crypto/x509/x_all.cc" + "crypto/x509/x_attrib.cc" + "crypto/x509/x_crl.cc" + "crypto/x509/x_exten.cc" + "crypto/x509/x_name.cc" + "crypto/x509/x_pubkey.cc" + "crypto/x509/x_req.cc" + "crypto/x509/x_sig.cc" + "crypto/x509/x_spki.cc" + "crypto/x509/x_val.cc" + "crypto/x509/x_x509.cc" + "crypto/x509/x_x509a.cc" + "gen/crypto/err_data.cc") if(CMAKE_SYSTEM_NAME STREQUAL Darwin AND CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64") target_sources(CCryptoBoringSSL PRIVATE diff --git a/Sources/_CryptoExtras/CMakeLists.txt b/Sources/_CryptoExtras/CMakeLists.txt index 1229d508..9c578708 100644 --- a/Sources/_CryptoExtras/CMakeLists.txt +++ b/Sources/_CryptoExtras/CMakeLists.txt @@ -13,6 +13,14 @@ ##===----------------------------------------------------------------------===## add_library(_CryptoExtras + "AES/AES_CBC.swift" + "AES/AES_CFB.swift" + "AES/AES_CTR.swift" + "AES/AES_GCM_SIV.swift" + "AES/Block Function.swift" + "AES/BoringSSL/AES_CFB_boring.swift" + "AES/BoringSSL/AES_CTR_boring.swift" + "AES/BoringSSL/AES_GCM_SIV_boring.swift" "ChaCha20CTR/BoringSSL/ChaCha20CTR_boring.swift" "ChaCha20CTR/ChaCha20CTR.swift" "ECToolbox/BoringSSL/ECToolbox_boring.swift" diff --git a/scripts/update-cmake-lists.sh b/scripts/update-cmake-lists.sh index 46057567..d884239e 100755 --- a/scripts/update-cmake-lists.sh +++ b/scripts/update-cmake-lists.sh @@ -3,7 +3,7 @@ ## ## This source file is part of the SwiftCrypto open source project ## -## Copyright (c) 2021-2023 Apple Inc. and the SwiftCrypto project authors +## Copyright (c) 2021-2024 Apple Inc. and the SwiftCrypto project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information @@ -30,7 +30,7 @@ esac function update_cmakelists_source() { src_root="$here/Sources/$1" - src_exts=("*.c" "*.swift") + src_exts=("*.c" "*.swift" "*.cc") num_exts=${#src_exts[@]} echo "Finding source files (" "${src_exts[@]}" ") under $src_root"