From 200e35654b1152299eeddbb69464834c42bca4be Mon Sep 17 00:00:00 2001 From: Sunny Chung Date: Mon, 18 Dec 2023 21:52:32 +0800 Subject: [PATCH] update condition of determining a CA certificates to include checking the basic constraints extension --- .../hellohttp/ux/SubprojectEnvironmentsEditorDialogView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jvmMain/kotlin/com/sunnychung/application/multiplatform/hellohttp/ux/SubprojectEnvironmentsEditorDialogView.kt b/src/jvmMain/kotlin/com/sunnychung/application/multiplatform/hellohttp/ux/SubprojectEnvironmentsEditorDialogView.kt index 0bd55a0f..3c1641c4 100644 --- a/src/jvmMain/kotlin/com/sunnychung/application/multiplatform/hellohttp/ux/SubprojectEnvironmentsEditorDialogView.kt +++ b/src/jvmMain/kotlin/com/sunnychung/application/multiplatform/hellohttp/ux/SubprojectEnvironmentsEditorDialogView.kt @@ -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(),