From: Felix Dörre Date: Fri, 15 Aug 2014 22:25:50 +0000 (+0200) Subject: Guess the profile based on requested eku. X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=8620879efa455365141d54d7457f0f58bd2c41c3 Guess the profile based on requested eku. --- diff --git a/src/org/cacert/gigi/pages/account/CertificateIssueForm.java b/src/org/cacert/gigi/pages/account/CertificateIssueForm.java index 2bca9d58..115e958e 100644 --- a/src/org/cacert/gigi/pages/account/CertificateIssueForm.java +++ b/src/org/cacert/gigi/pages/account/CertificateIssueForm.java @@ -178,12 +178,15 @@ public class CertificateIssueForm extends Form { for (String s : ekue.getExtendedKeyUsage()) { if (s.equals(OID_KEY_USAGE_SSL_SERVER.toString())) { // server + profile = CertificateProfile.getByName("server"); } else if (s.equals(OID_KEY_USAGE_SSL_CLIENT.toString())) { // client + profile = CertificateProfile.getByName("client"); } else if (s.equals(OID_KEY_USAGE_CODESIGN.toString())) { // code sign } else if (s.equals(OID_KEY_USAGE_EMAIL_PROTECTION.toString())) { // emailProtection + profile = CertificateProfile.getByName("mail"); } else if (s.equals(OID_KEY_USAGE_TIMESTAMP.toString())) { // timestamp } else if (s.equals(OID_KEY_USAGE_OCSP.toString())) {