From 71d767826ea9dbd16f0d6da92dfa321308ce3f9d Mon Sep 17 00:00:00 2001 From: INOPIAE Date: Fri, 25 Oct 2019 07:46:00 +0200 Subject: [PATCH] add: enable user to download certificate with file extention crt or pem fixes issue #176 Change-Id: Id7ef99fba44b8266dcd9a7940c616e77a0cbb8da --- .../account/certs/CertificateDisplay.templ | 19 ++++++++++--------- .../pages/account/certs/Certificates.java | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) 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")) { -- 2.39.2