blob: fcbda8119a6012e5a056cfd5421b893d48035827 [file] [log] [blame]
// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
package {
default_applicable_licenses: ["external_rust_crates_ring_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "external_rust_crates_ring_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-ISC",
"SPDX-license-identifier-MIT",
"SPDX-license-identifier-OpenSSL",
"legacy_unencumbered",
],
license_text: [
"LICENSE",
],
}
rust_library {
name: "libring",
// has rustc warnings
host_supported: true,
crate_name: "ring",
cargo_env_compat: true,
cargo_pkg_version: "0.17.0-alpha.11",
srcs: ["src/lib.rs"],
edition: "2018",
features: [
"alloc",
"default",
"dev_urandom_fallback",
"once_cell",
"std",
],
rustlibs: [
"liblibc",
"libonce_cell",
"libspin",
"libuntrusted",
],
whole_static_libs: [
"libring-core",
"libring-test",
],
apex_available: [
"//apex_available:platform",
"com.android.resolv",
],
vendor_available: true,
product_available: true,
min_sdk_version: "29",
}
rust_test {
name: "ring_test_src_lib",
// has rustc warnings
host_supported: true,
crate_name: "ring",
cargo_env_compat: true,
cargo_pkg_version: "0.17.0-alpha.11",
srcs: ["src/lib.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
test_options: {
unit_test: true,
},
edition: "2018",
features: [
"alloc",
"default",
"dev_urandom_fallback",
"once_cell",
"std",
],
rustlibs: [
"liblibc",
"libonce_cell",
"libspin",
"libuntrusted",
],
whole_static_libs: [
"libring-core",
"libring-test",
],
}
rust_defaults {
name: "ring_test_defaults",
crate_name: "ring",
cargo_env_compat: true,
cargo_pkg_version: "0.17.0-alpha.11",
test_suites: ["general-tests"],
auto_gen_config: true,
edition: "2018",
features: [
"alloc",
"default",
"dev_urandom_fallback",
"once_cell",
"std",
],
rustlibs: [
"liblibc",
"libonce_cell",
"libring",
"libspin",
"libuntrusted",
],
}
rust_test {
name: "ring_test_tests_aead_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/aead_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_agreement_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/agreement_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_constant_time_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/constant_time_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_digest_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/digest_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_ecdsa_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/ecdsa_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_ed25519_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/ed25519_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_hkdf_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/hkdf_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_hmac_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/hmac_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_pbkdf2_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/pbkdf2_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_quic_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/quic_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_rand_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/rand_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_rsa_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/rsa_tests.rs"],
test_options: {
unit_test: true,
},
}
rust_test {
name: "ring_test_tests_signature_tests",
defaults: ["ring_test_defaults"],
// has rustc warnings
host_supported: true,
srcs: ["tests/signature_tests.rs"],
test_options: {
unit_test: true,
},
}
cc_library_static {
name: "libring-core",
host_supported: true,
srcs: [
"crypto/cpu-intel.c",
"crypto/fipsmodule/aes/aes_nohw.c",
"crypto/crypto.c",
"crypto/poly1305/poly1305.c",
"crypto/poly1305/poly1305_vec.c",
"crypto/curve25519/curve25519.c",
"crypto/fipsmodule/ec/ecp_nistz.c",
"crypto/fipsmodule/ec/gfp_p256.c",
"crypto/fipsmodule/ec/gfp_p384.c",
"crypto/fipsmodule/ec/p256.c",
"crypto/fipsmodule/rsa/padding.c",
"crypto/limbs/limbs.c",
"crypto/mem.c",
"crypto/fipsmodule/bn/montgomery.c",
"crypto/fipsmodule/bn/montgomery_inv.c",
],
arch: {
arm: {
srcs: [
"crypto/poly1305/poly1305_arm.c",
"crypto/poly1305/poly1305_arm_asm.S",
"pregenerated/armv4-mont-linux32.S",
"crypto/curve25519/asm/x25519-asm-arm.S",
"pregenerated/sha256-armv4-linux32.S",
"pregenerated/sha512-armv4-linux32.S",
"pregenerated/aesv8-armx-linux32.S",
"pregenerated/bsaes-armv7-linux32.S",
"pregenerated/ghashv8-armx-linux32.S",
"pregenerated/vpaes-armv7-linux32.S",
"pregenerated/ghash-armv4-linux32.S",
"pregenerated/chacha-armv4-linux32.S",
],
},
arm64: {
srcs: [
"pregenerated/aesv8-armx-linux64.S",
"pregenerated/armv8-mont-linux64.S",
"pregenerated/chacha-armv8-linux64.S",
"pregenerated/ghash-neon-armv8-linux64.S",
"pregenerated/ghashv8-armx-linux64.S",
"pregenerated/sha256-armv8-linux64.S",
"pregenerated/sha512-armv8-linux64.S",
"pregenerated/vpaes-armv8-linux64.S",
],
},
x86: {
srcs: [
"pregenerated/aesni-x86-elf.S",
"pregenerated/chacha-x86-elf.S",
"pregenerated/ghash-x86-elf.S",
"pregenerated/vpaes-x86-elf.S",
"pregenerated/x86-mont-elf.S",
],
},
x86_64: {
srcs: [
"crypto/fipsmodule/ec/p256-x86_64.c",
"pregenerated/aesni-gcm-x86_64-elf.S",
"pregenerated/aesni-x86_64-elf.S",
"pregenerated/chacha-x86_64-elf.S",
"pregenerated/chacha20_poly1305_x86_64-elf.S",
"pregenerated/ghash-x86_64-elf.S",
"pregenerated/p256-x86_64-asm-elf.S",
"pregenerated/sha256-x86_64-elf.S",
"pregenerated/sha512-x86_64-elf.S",
"pregenerated/vpaes-x86_64-elf.S",
"pregenerated/x86_64-mont5-elf.S",
"pregenerated/x86_64-mont-elf.S",
],
},
riscv64: {
cflags: ["-DOPENSSL_NO_ASM"],
},
},
cflags: [
"-O3",
"-Wno-error",
"-fPIC",
"-fdata-sections",
"-ffunction-sections",
"-fno-omit-frame-pointer",
"-fno-strict-aliasing",
"-fstack-protector",
"-fvisibility=hidden",
"-DNDEBUG",
],
local_include_dirs: ["include"],
apex_available: [
"//apex_available:platform",
"com.android.resolv",
],
vendor_available: true,
product_available: true,
min_sdk_version: "29",
}
cc_library_static {
name: "libring-test",
host_supported: true,
srcs: [
"crypto/constant_time_test.c",
],
local_include_dirs: ["include"],
apex_available: [
"//apex_available:platform",
"com.android.resolv",
],
vendor_available: true,
product_available: true,
min_sdk_version: "29",
}