2018-06-23 00:21:48 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-09-13 20:26:43 -04:00
|
|
|
#Reference: https://grapheneos.org/build#generating-release-signing-keys
|
|
|
|
|
2018-06-29 00:55:21 -04:00
|
|
|
type='rsa'; #Options: rsa, ec
|
2018-06-10 17:04:58 -04:00
|
|
|
|
2019-09-13 20:26:43 -04:00
|
|
|
#make -j20 generate_verity_key;
|
|
|
|
|
|
|
|
cd "$DOS_SIGNING_KEYS";
|
|
|
|
mkdir $1; cd $1;
|
|
|
|
desc="/O=Divested Computing Group/CN=DivestOS for $1/emailAddress=support@divestos.org";
|
2018-06-29 00:55:21 -04:00
|
|
|
"$DOS_BUILD_BASE"/development/tools/make_key extra "$desc" "$type";
|
|
|
|
"$DOS_BUILD_BASE"/development/tools/make_key media "$desc" "$type";
|
|
|
|
"$DOS_BUILD_BASE"/development/tools/make_key platform "$desc" "$type";
|
|
|
|
"$DOS_BUILD_BASE"/development/tools/make_key releasekey "$desc" "$type";
|
|
|
|
"$DOS_BUILD_BASE"/development/tools/make_key shared "$desc" "$type";
|
|
|
|
"$DOS_BUILD_BASE"/development/tools/make_key verity "$desc" "$type";
|
2019-09-13 20:26:43 -04:00
|
|
|
"$DOS_BUILD_BASE"/out/host/linux-x86/bin/generate_verity_key -convert verity.x509.pem verity_key;
|
|
|
|
openssl x509 -outform der -in verity.x509.pem -out verifiedboot_relkeys.der.x509;
|
|
|
|
openssl genrsa -out avb.pem 2048;
|
|
|
|
"$DOS_BUILD_BASE"/external/avb/avbtool extract_public_key --key avb.pem --output avb_pkmd.bin;
|
|
|
|
cd "$DOS_BUILD_BASE";
|