From: INOPIAE Date: Fri, 25 Oct 2019 05:46:00 +0000 (+0200) Subject: add: enable user to download certificate with file extention crt or pem X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=71d767826ea9dbd16f0d6da92dfa321308ce3f9d add: enable user to download certificate with file extention crt or pem fixes issue #176 Change-Id: Id7ef99fba44b8266dcd9a7940c616e77a0cbb8da --- diff --git a/src/club/wpia/gigi/pages/account/certs/CertificateDisplay.templ b/src/club/wpia/gigi/pages/account/certs/CertificateDisplay.templ index f2aaf870..a688cfed 100644 --- a/src/club/wpia/gigi/pages/account/certs/CertificateDisplay.templ +++ b/src/club/wpia/gigi/pages/account/certs/CertificateDisplay.templ @@ -37,19 +37,20 @@ - : + *: - + (CRT/PEM) - *
-
-
-
-
+
+ (CRT/PEM)
+ (CRT/PEM)
+ (CRT/PEM)
+ (CER)

- . *

- * '!?> + .

+ * '!?>.
+ '!?>. diff --git a/src/club/wpia/gigi/pages/account/certs/Certificates.java b/src/club/wpia/gigi/pages/account/certs/Certificates.java index 9c0dafd0..765a0fd0 100644 --- a/src/club/wpia/gigi/pages/account/certs/Certificates.java +++ b/src/club/wpia/gigi/pages/account/certs/Certificates.java @@ -66,7 +66,7 @@ public class Certificates extends Page implements HandlesMixedRequest { if (req.getParameter("install") != null) { resp.setContentType("application/x-x509-user-cert"); } - if (pi.endsWith(".crt")) { + if (pi.endsWith(".crt") || pi.endsWith(".pem")) { crt = true; pi = pi.substring(0, pi.length() - 4); } else if (pi.endsWith(".cer")) {