diff options
author | Alice Wang <aliceywang@google.com> | 2022-12-22 15:20:20 +0000 |
---|---|---|
committer | Alice Wang <aliceywang@google.com> | 2022-12-22 17:45:42 +0000 |
commit | 2ec507fdef5ac62bd1cbcabc2f94e19d8aaa475a (patch) | |
tree | ea2727df1ff04ba262fd0e12af6208c561eeb7c9 | |
parent | 5e7fab750c80ef50a334675540a6a3078bb2954c (diff) | |
download | avb-2ec507fdef5ac62bd1cbcabc2f94e19d8aaa475a.tar.gz |
[avb] Generate public keys avb_testkey_rsa*_pub_bin on the fly
- avb_testkey_rsa4096_pub_bin is used in pvmfw
- All of them will be used in libpvmfw_avb.test
(aosp/2362320) and libvbmeta_rust.test.
Test: m pvmfw_img
Change-Id: Ia83496a9ba1400083674632932ad041908cc5dd6
-rw-r--r-- | test/Android.bp | 27 | ||||
-rw-r--r-- | test/data/testkey_rsa4096_pub.bin | bin | 1032 -> 0 bytes |
2 files changed, 23 insertions, 4 deletions
diff --git a/test/Android.bp b/test/Android.bp index 321e068..8d8809a 100644 --- a/test/Android.bp +++ b/test/Android.bp @@ -54,11 +54,30 @@ filegroup { } filegroup { + name: "avb_testkey_rsa2048", + srcs: ["data/testkey_rsa2048.pem"], +} + +genrule { + name: "avb_testkey_rsa2048_pub_bin", + tools: ["avbtool"], + srcs: [":avb_testkey_rsa2048"], + out: ["data/testkey_rsa2048_pub.bin"], + cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", +} + +genrule { name: "avb_testkey_rsa4096_pub_bin", - srcs: ["data/testkey_rsa4096_pub.bin"], + tools: ["avbtool"], + srcs: [":avb_testkey_rsa4096"], + out: ["data/testkey_rsa4096_pub.bin"], + cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", } -filegroup { - name: "avb_testkey_rsa2048", - srcs: ["data/testkey_rsa2048.pem"], +genrule { + name: "avb_testkey_rsa8192_pub_bin", + tools: ["avbtool"], + srcs: [":avb_testkey_rsa8192"], + out: ["data/testkey_rsa8192_pub.bin"], + cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", } diff --git a/test/data/testkey_rsa4096_pub.bin b/test/data/testkey_rsa4096_pub.bin Binary files differdeleted file mode 100644 index f2e8fbd..0000000 --- a/test/data/testkey_rsa4096_pub.bin +++ /dev/null |