Skip to content

Commit e82b982

Browse files
JingMatrixMhmRddEnginex0
authored
Fix default certificate subject (#166)
The AOSP KeyMint reference implementation uses "CN=Android Keystore Key" (lowercase 's') as the default certificate subject when no CERTIFICATE_SUBJECT tag is provided. Reference: https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/keystore/java/android/security/keystore/KeyGenParameterSpec.java; Co-authored-by: Mohammed Riad <52679407+MhmRdd@users.noreply.github.com> Co-authored-by: Enginex0 <osazuwa1999@gmail.com>
1 parent 8c74958 commit e82b982

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/org/matrix/TEESimulator/pki/CertificateGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ object CertificateGenerator {
217217
uid: Int,
218218
securityLevel: Int,
219219
): Certificate {
220-
val subject = params.certificateSubject ?: X500Name("CN=Android KeyStore Key")
220+
val subject = params.certificateSubject ?: X500Name("CN=Android Keystore Key")
221221
val leafNotAfter =
222222
(signingKeyPair.public as? X509Certificate)?.notAfter
223223
?: Date(System.currentTimeMillis() + 31536000000L)

0 commit comments

Comments
 (0)