Skip to content

Commit

Permalink
update condition of determining a CA certificates to include checking…
Browse files Browse the repository at this point in the history
… the basic constraints extension
  • Loading branch information
sunny-chung committed Dec 18, 2023
1 parent e08ec65 commit 200e356
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ fun CertificateEditorView(
id = uuidString(),
name = cert.subjectX500Principal.getName(X500Principal.RFC1779) +
"\nExpiry: ${KZonedInstant(cert.notAfter.time, KZoneOffset.local()).format(KDateTimeFormat.ISO8601_DATETIME.pattern)}" +
if (cert.keyUsage?.get(5) != true) "\n⚠️ Not a CA certificate!" else ""
if (cert.keyUsage?.get(5) != true || cert.basicConstraints < 0) "\n⚠️ Not a CA certificate!" else ""
,
originalFilename = file.name,
createdWhen = KInstant.now(),
Expand Down

0 comments on commit 200e356

Please sign in to comment.