mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 03:37:58 +00:00
SignBoot: use verity keys not testkey to correctly follow AOSP
This commit is contained in:
parent
aaf88b1895
commit
085ea6d0a1
@ -87,12 +87,12 @@ public class SignBoot {
|
||||
in.unread(hdr);
|
||||
BootSignature bootsig = new BootSignature(target, signableSize);
|
||||
if (cert == null) {
|
||||
cert = SignBoot.class.getResourceAsStream("/keys/testkey.x509.pem");
|
||||
cert = SignBoot.class.getResourceAsStream("/keys/verity.x509.pem");
|
||||
}
|
||||
X509Certificate certificate = CryptoUtils.readCertificate(cert);
|
||||
bootsig.setCertificate(certificate);
|
||||
if (key == null) {
|
||||
key = SignBoot.class.getResourceAsStream("/keys/testkey.pk8");
|
||||
key = SignBoot.class.getResourceAsStream("/keys/verity.pk8");
|
||||
}
|
||||
PrivateKey privateKey = CryptoUtils.readPrivateKey(key);
|
||||
byte[] sig = bootsig.sign(privateKey, in, signableSize);
|
||||
|
BIN
signing/src/main/resources/keys/verity.pk8
Normal file
BIN
signing/src/main/resources/keys/verity.pk8
Normal file
Binary file not shown.
24
signing/src/main/resources/keys/verity.x509.pem
Normal file
24
signing/src/main/resources/keys/verity.x509.pem
Normal file
@ -0,0 +1,24 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
|
||||
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g
|
||||
VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE
|
||||
AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
|
||||
Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET
|
||||
MBEGA1UECAwKQ2FsaWZvcm5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NqRGZgDyqzuTrFxn6FW7dmyA
|
||||
yttuAJAEAymk1mipd9+zp38=
|
||||
-----END CERTIFICATE-----
|
Loading…
x
Reference in New Issue
Block a user