blob: 7e114e3eb86996fac4e360c84b8515117b0d7cf2 [file] [log] [blame]
# Copyright 2016 The Fuchsia Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This file was generated by fuchsia/generate.py. Do not edit manually.
config("boringssl_config") {
include_dirs = [ "include" ]
if (defined(is_fuchsia) && is_fuchsia) {
libs = [ "magenta" ]
}
defines = [
"OPENSSL_NO_THREADS",
]
}
config("internal_config") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
defines = [
"BORINGSSL_IMPLEMENTATION",
"BORINGSSL_SHARED_LIBRARY",
"BORINGSSL_NO_STATIC_INITIALIZER",
"OPENSSL_SMALL",
"OPENSSL_NO_ASM",
"_XOPEN_SOURCE=700" ,
]
cflags_c = [ "-std=c11" ]
}
shared_library("crypto") {
sources = [
"crypto/aes/aes.c",
"crypto/aes/key_wrap.c",
"crypto/aes/mode_wrappers.c",
"crypto/asn1/a_bitstr.c",
"crypto/asn1/a_bool.c",
"crypto/asn1/a_d2i_fp.c",
"crypto/asn1/a_dup.c",
"crypto/asn1/a_enum.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_print.c",
"crypto/asn1/a_strnid.c",
"crypto/asn1/a_time.c",
"crypto/asn1/a_type.c",
"crypto/asn1/a_utctm.c",
"crypto/asn1/a_utf8.c",
"crypto/asn1/asn1_lib.c",
"crypto/asn1/asn1_par.c",
"crypto/asn1/asn_pack.c",
"crypto/asn1/f_enum.c",
"crypto/asn1/f_int.c",
"crypto/asn1/f_string.c",
"crypto/asn1/t_bitst.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/asn1/x_bignum.c",
"crypto/asn1/x_long.c",
"crypto/base64/base64.c",
"crypto/bio/bio.c",
"crypto/bio/bio_mem.c",
"crypto/bio/buffer.c",
"crypto/bio/connect.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/bn/add.c",
"crypto/bn/asm/x86_64-gcc.c",
"crypto/bn/bn.c",
"crypto/bn/bn_asn1.c",
"crypto/bn/cmp.c",
"crypto/bn/convert.c",
"crypto/bn/ctx.c",
"crypto/bn/div.c",
"crypto/bn/exponentiation.c",
"crypto/bn/gcd.c",
"crypto/bn/generic.c",
"crypto/bn/kronecker.c",
"crypto/bn/montgomery.c",
"crypto/bn/montgomery_inv.c",
"crypto/bn/mul.c",
"crypto/bn/prime.c",
"crypto/bn/random.c",
"crypto/bn/rsaz_exp.c",
"crypto/bn/shift.c",
"crypto/bn/sqrt.c",
"crypto/buf/buf.c",
"crypto/bytestring/asn1_compat.c",
"crypto/bytestring/ber.c",
"crypto/bytestring/cbb.c",
"crypto/bytestring/cbs.c",
"crypto/chacha/chacha.c",
"crypto/cipher/aead.c",
"crypto/cipher/cipher.c",
"crypto/cipher/derive_key.c",
"crypto/cipher/e_aes.c",
"crypto/cipher/e_chacha20poly1305.c",
"crypto/cipher/e_des.c",
"crypto/cipher/e_null.c",
"crypto/cipher/e_rc2.c",
"crypto/cipher/e_rc4.c",
"crypto/cipher/e_ssl3.c",
"crypto/cipher/e_tls.c",
"crypto/cipher/tls_cbc.c",
"crypto/cmac/cmac.c",
"crypto/conf/conf.c",
"crypto/cpu-aarch64-linux.c",
"crypto/cpu-arm-linux.c",
"crypto/cpu-arm.c",
"crypto/cpu-intel.c",
"crypto/cpu-ppc64le.c",
"crypto/crypto.c",
"crypto/curve25519/curve25519.c",
"crypto/curve25519/spake25519.c",
"crypto/curve25519/x25519-x86_64.c",
"crypto/des/des.c",
"crypto/dh/check.c",
"crypto/dh/dh.c",
"crypto/dh/dh_asn1.c",
"crypto/dh/params.c",
"crypto/digest/digest.c",
"crypto/digest/digests.c",
"crypto/dsa/dsa.c",
"crypto/dsa/dsa_asn1.c",
"crypto/ec/ec.c",
"crypto/ec/ec_asn1.c",
"crypto/ec/ec_key.c",
"crypto/ec/ec_montgomery.c",
"crypto/ec/oct.c",
"crypto/ec/p224-64.c",
"crypto/ec/p256-64.c",
"crypto/ec/p256-x86_64.c",
"crypto/ec/simple.c",
"crypto/ec/util-64.c",
"crypto/ec/wnaf.c",
"crypto/ecdh/ecdh.c",
"crypto/ecdsa/ecdsa.c",
"crypto/ecdsa/ecdsa_asn1.c",
"crypto/engine/engine.c",
"crypto/err/err.c",
"crypto/err/err_data.c",
"crypto/evp/digestsign.c",
"crypto/evp/evp.c",
"crypto/evp/evp_asn1.c",
"crypto/evp/evp_ctx.c",
"crypto/evp/p_dsa_asn1.c",
"crypto/evp/p_ec.c",
"crypto/evp/p_ec_asn1.c",
"crypto/evp/p_rsa.c",
"crypto/evp/p_rsa_asn1.c",
"crypto/evp/pbkdf.c",
"crypto/evp/print.c",
"crypto/evp/sign.c",
"crypto/ex_data.c",
"crypto/hkdf/hkdf.c",
"crypto/hmac/hmac.c",
"crypto/lhash/lhash.c",
"crypto/md4/md4.c",
"crypto/md5/md5.c",
"crypto/mem.c",
"crypto/modes/cbc.c",
"crypto/modes/cfb.c",
"crypto/modes/ctr.c",
"crypto/modes/gcm.c",
"crypto/modes/ofb.c",
"crypto/modes/polyval.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/pkcs8/p5_pbe.c",
"crypto/pkcs8/p5_pbev2.c",
"crypto/pkcs8/p8_pkey.c",
"crypto/pkcs8/pkcs8.c",
"crypto/poly1305/poly1305.c",
"crypto/poly1305/poly1305_arm.c",
"crypto/poly1305/poly1305_vec.c",
"crypto/pool/pool.c",
"crypto/rand/deterministic.c",
"crypto/rand/fuchsia.c",
"crypto/rand/rand.c",
"crypto/rand/urandom.c",
"crypto/rand/windows.c",
"crypto/rc4/rc4.c",
"crypto/refcount_c11.c",
"crypto/refcount_lock.c",
"crypto/rsa/blinding.c",
"crypto/rsa/padding.c",
"crypto/rsa/rsa.c",
"crypto/rsa/rsa_asn1.c",
"crypto/rsa/rsa_impl.c",
"crypto/sha/sha1-altivec.c",
"crypto/sha/sha1.c",
"crypto/sha/sha256.c",
"crypto/sha/sha512.c",
"crypto/stack/stack.c",
"crypto/thread.c",
"crypto/thread_none.c",
"crypto/thread_pthread.c",
"crypto/thread_win.c",
"crypto/time_support.c",
"crypto/x509/a_digest.c",
"crypto/x509/a_sign.c",
"crypto/x509/a_strex.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/pkcs7.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/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_r2x.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/x509type.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_info.c",
"crypto/x509/x_name.c",
"crypto/x509/x_pkey.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",
"crypto/x509v3/pcy_cache.c",
"crypto/x509v3/pcy_data.c",
"crypto/x509v3/pcy_lib.c",
"crypto/x509v3/pcy_map.c",
"crypto/x509v3/pcy_node.c",
"crypto/x509v3/pcy_tree.c",
"crypto/x509v3/v3_akey.c",
"crypto/x509v3/v3_akeya.c",
"crypto/x509v3/v3_alt.c",
"crypto/x509v3/v3_bcons.c",
"crypto/x509v3/v3_bitst.c",
"crypto/x509v3/v3_conf.c",
"crypto/x509v3/v3_cpols.c",
"crypto/x509v3/v3_crld.c",
"crypto/x509v3/v3_enum.c",
"crypto/x509v3/v3_extku.c",
"crypto/x509v3/v3_genn.c",
"crypto/x509v3/v3_ia5.c",
"crypto/x509v3/v3_info.c",
"crypto/x509v3/v3_int.c",
"crypto/x509v3/v3_lib.c",
"crypto/x509v3/v3_ncons.c",
"crypto/x509v3/v3_pci.c",
"crypto/x509v3/v3_pcia.c",
"crypto/x509v3/v3_pcons.c",
"crypto/x509v3/v3_pku.c",
"crypto/x509v3/v3_pmaps.c",
"crypto/x509v3/v3_prn.c",
"crypto/x509v3/v3_purp.c",
"crypto/x509v3/v3_skey.c",
"crypto/x509v3/v3_sxnet.c",
"crypto/x509v3/v3_utl.c",
]
public_configs = [ ":boringssl_config" ]
configs += [ ":internal_config" ]
}
shared_library("ssl") {
sources = [
"ssl/custom_extensions.c",
"ssl/d1_both.c",
"ssl/d1_lib.c",
"ssl/d1_pkt.c",
"ssl/d1_srtp.c",
"ssl/dtls_method.c",
"ssl/dtls_record.c",
"ssl/handshake_client.c",
"ssl/handshake_server.c",
"ssl/s3_both.c",
"ssl/s3_enc.c",
"ssl/s3_lib.c",
"ssl/s3_pkt.c",
"ssl/ssl_aead_ctx.c",
"ssl/ssl_asn1.c",
"ssl/ssl_buffer.c",
"ssl/ssl_cert.c",
"ssl/ssl_cipher.c",
"ssl/ssl_ecdh.c",
"ssl/ssl_file.c",
"ssl/ssl_lib.c",
"ssl/ssl_rsa.c",
"ssl/ssl_session.c",
"ssl/ssl_stat.c",
"ssl/t1_enc.c",
"ssl/t1_lib.c",
"ssl/tls13_both.c",
"ssl/tls13_client.c",
"ssl/tls13_enc.c",
"ssl/tls13_server.c",
"ssl/tls_method.c",
"ssl/tls_record.c",
]
public_configs = [ ":boringssl_config" ]
configs += [ ":internal_config" ]
}
group("boringssl") {
deps = [
":crypto",
":ssl",
]
public_configs = [ ":boringssl_config" ]
}
executable("bssl") {
sources = [
"tool/args.cc",
"tool/ciphers.cc",
"tool/client.cc",
"tool/const.cc",
"tool/digest.cc",
"tool/generate_ed25519.cc",
"tool/genrsa.cc",
"tool/pkcs12.cc",
"tool/rand.cc",
"tool/server.cc",
"tool/speed.cc",
"tool/tool.cc",
"tool/transport_common.cc",
]
configs += [ ":internal_config" ]
deps = [ ":boringssl" ]
}
source_set("test_support") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
testonly = true
sources = [
"crypto/test/file_test.cc",
"crypto/test/file_test.h",
"crypto/test/malloc.cc",
"crypto/test/test_util.cc",
"crypto/test/test_util.h",
"ssl/test/async_bio.h",
"ssl/test/packeted_bio.h",
"ssl/test/test_config.h",
]
public_configs = [ ":boringssl_config" ]
configs += [ ":internal_config" ]
deps = [ ":boringssl" ]
}
template("unit_test") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
testonly = true
assert(defined(invoker.sources))
executable(target_name) {
sources = invoker.sources
configs += [ ":internal_config" ]
deps = [
":test_support"
]
}
}
unit_test("aead_test") {
sources = [ "crypto/cipher/aead_test.cc" ]
}
unit_test("aes_test") {
sources = [ "crypto/aes/aes_test.cc" ]
}
unit_test("asn1_test") {
sources = [ "crypto/asn1/asn1_test.cc" ]
}
unit_test("base64_test") {
sources = [ "crypto/base64/base64_test.cc" ]
}
unit_test("bio_test") {
sources = [ "crypto/bio/bio_test.cc" ]
}
unit_test("bn_test") {
sources = [ "crypto/bn/bn_test.cc" ]
}
unit_test("bytestring_test") {
sources = [ "crypto/bytestring/bytestring_test.cc" ]
}
unit_test("chacha_test") {
sources = [ "crypto/chacha/chacha_test.cc" ]
}
unit_test("cipher_test") {
sources = [ "crypto/cipher/cipher_test.cc" ]
}
unit_test("cmac_test") {
sources = [ "crypto/cmac/cmac_test.cc" ]
}
unit_test("constant_time_test") {
sources = [ "crypto/constant_time_test.cc" ]
}
unit_test("dh_test") {
sources = [ "crypto/dh/dh_test.cc" ]
}
unit_test("digest_test") {
sources = [ "crypto/digest/digest_test.cc" ]
}
unit_test("dsa_test") {
sources = [ "crypto/dsa/dsa_test.cc" ]
}
unit_test("ec_test") {
sources = [ "crypto/ec/ec_test.cc" ]
}
unit_test("ecdh_test") {
sources = [ "crypto/ecdh/ecdh_test.cc" ]
}
unit_test("ecdsa_sign_test") {
sources = [ "crypto/ecdsa/ecdsa_sign_test.cc" ]
}
unit_test("ecdsa_test") {
sources = [ "crypto/ecdsa/ecdsa_test.cc" ]
}
unit_test("ecdsa_verify_test") {
sources = [ "crypto/ecdsa/ecdsa_verify_test.cc" ]
}
unit_test("ed25519_test") {
sources = [ "crypto/curve25519/ed25519_test.cc" ]
}
unit_test("err_test") {
sources = [ "crypto/err/err_test.cc" ]
}
unit_test("evp_extra_test") {
sources = [ "crypto/evp/evp_extra_test.cc" ]
}
unit_test("evp_test") {
sources = [ "crypto/evp/evp_test.cc" ]
}
unit_test("example_mul") {
sources = [ "crypto/ec/example_mul.c" ]
}
unit_test("gcm_test") {
sources = [ "crypto/modes/gcm_test.cc" ]
}
unit_test("hkdf_test") {
sources = [ "crypto/hkdf/hkdf_test.cc" ]
}
unit_test("hmac_test") {
sources = [ "crypto/hmac/hmac_test.cc" ]
}
unit_test("lhash_test") {
sources = [ "crypto/lhash/lhash_test.cc" ]
}
unit_test("obj_test") {
sources = [ "crypto/obj/obj_test.cc" ]
}
unit_test("p256-x86_64_test") {
sources = [ "crypto/ec/p256-x86_64_test.cc" ]
}
unit_test("pbkdf_test") {
sources = [ "crypto/evp/pbkdf_test.cc" ]
}
unit_test("pkcs12_test") {
sources = [ "crypto/pkcs8/pkcs12_test.cc" ]
}
unit_test("pkcs7_test") {
sources = [ "crypto/x509/pkcs7_test.c" ]
}
unit_test("pkcs8_test") {
sources = [ "crypto/pkcs8/pkcs8_test.cc" ]
}
unit_test("poly1305_test") {
sources = [ "crypto/poly1305/poly1305_test.cc" ]
}
unit_test("pool_test") {
sources = [ "crypto/pool/pool_test.cc" ]
}
unit_test("refcount_test") {
sources = [ "crypto/refcount_test.cc" ]
}
unit_test("rsa_test") {
sources = [ "crypto/rsa/rsa_test.cc" ]
}
unit_test("spake25519_test") {
sources = [ "crypto/curve25519/spake25519_test.cc" ]
}
unit_test("ssl_test") {
sources = [ "ssl/ssl_test.cc" ]
}
unit_test("tab_test") {
sources = [ "crypto/x509v3/tab_test.c" ]
}
unit_test("thread_test") {
sources = [ "crypto/thread_test.c" ]
}
unit_test("v3name_test") {
sources = [ "crypto/x509v3/v3name_test.c" ]
}
unit_test("x25519_test") {
sources = [ "crypto/curve25519/x25519_test.cc" ]
}
unit_test("x509_test") {
sources = [ "crypto/x509/x509_test.cc" ]
}
group("unit_tests") {
testonly = true
deps = [
":aead_test",
":aes_test",
":asn1_test",
":base64_test",
":bio_test",
":bn_test",
":bytestring_test",
":chacha_test",
":cipher_test",
":cmac_test",
":constant_time_test",
":dh_test",
":digest_test",
":dsa_test",
":ec_test",
":ecdh_test",
":ecdsa_sign_test",
":ecdsa_test",
":ecdsa_verify_test",
":ed25519_test",
":err_test",
":evp_extra_test",
":evp_test",
":example_mul",
":gcm_test",
":hkdf_test",
":hmac_test",
":lhash_test",
":obj_test",
":p256-x86_64_test",
":pbkdf_test",
":pkcs12_test",
":pkcs7_test",
":pkcs8_test",
":poly1305_test",
":pool_test",
":refcount_test",
":rsa_test",
":spake25519_test",
":ssl_test",
":tab_test",
":thread_test",
":v3name_test",
":x25519_test",
":x509_test",
]
}