Add more crypto operations.
Test: keystore2_crypto_test_rust
Change-Id: Ice2facdc1b41f4e4ece839c2a3b956889e813960
diff --git a/keystore2/src/crypto/Android.bp b/keystore2/src/crypto/Android.bp
index 03c42b2..9ecd823 100644
--- a/keystore2/src/crypto/Android.bp
+++ b/keystore2/src/crypto/Android.bp
@@ -47,6 +47,30 @@
crate_name: "keystore2_crypto_bindgen",
source_stem: "bindings",
host_supported: true,
+ shared_libs: ["libcrypto"],
+ bindgen_flags: [
+ "--size_t-is-usize",
+ "--whitelist-function", "randomBytes",
+ "--whitelist-function", "AES_gcm_encrypt",
+ "--whitelist-function", "AES_gcm_decrypt",
+ "--whitelist-function", "CreateKeyId",
+ "--whitelist-function", "generateKeyFromPassword",
+ "--whitelist-function", "HKDFExtract",
+ "--whitelist-function", "HKDFExpand",
+ "--whitelist-function", "ECDHComputeKey",
+ "--whitelist-function", "ECKEYGenerateKey",
+ "--whitelist-function", "ECKEYDeriveFromSecret",
+ "--whitelist-function", "EC_KEY_get0_public_key",
+ "--whitelist-function", "ECPOINTPoint2Oct",
+ "--whitelist-function", "ECPOINTOct2Point",
+ "--whitelist-function", "EC_KEY_free",
+ "--whitelist-function", "EC_POINT_free",
+ "--whitelist-type", "EC_KEY",
+ "--whitelist-type", "EC_POINT",
+ "--whitelist-var", "EC_MAX_BYTES",
+ "--whitelist-var", "EVP_MAX_MD_SIZE",
+ ],
+ cflags: ["-DBORINGSSL_NO_CXX"],
}
rust_test {