From 75c38b20dbfb17c78cd7af219761948295bb0ba3 Mon Sep 17 00:00:00 2001 From: INOPIAE Date: Tue, 12 May 2020 10:34:35 +0200 Subject: [PATCH] upd: remove 'browser install' As we removed the certificate creation within the browser with SPKAC (https://gerrit.wpia.club/#/c/756/) there is no need to install a certificate into the browser truststore through the website as private key is missing. Change-Id: Icd62b26d607257a445e012081e1a9f86da479d81 --- .../wpia/gigi/pages/account/certs/CertificateDisplay.templ | 7 +++---- src/club/wpia/gigi/pages/account/certs/Certificates.java | 3 --- tests/club/wpia/gigi/pages/account/TestCertificateAdd.java | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/club/wpia/gigi/pages/account/certs/CertificateDisplay.templ b/src/club/wpia/gigi/pages/account/certs/CertificateDisplay.templ index e761a5b2..91b3c611 100644 --- a/src/club/wpia/gigi/pages/account/certs/CertificateDisplay.templ +++ b/src/club/wpia/gigi/pages/account/certs/CertificateDisplay.templ @@ -47,10 +47,9 @@ (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 765a0fd0..a11978a4 100644 --- a/src/club/wpia/gigi/pages/account/certs/Certificates.java +++ b/src/club/wpia/gigi/pages/account/certs/Certificates.java @@ -63,9 +63,6 @@ public class Certificates extends Page implements HandlesMixedRequest { boolean crt = false; boolean cer = false; resp.setContentType("application/pkix-cert"); - if (req.getParameter("install") != null) { - resp.setContentType("application/x-x509-user-cert"); - } if (pi.endsWith(".crt") || pi.endsWith(".pem")) { crt = true; pi = pi.substring(0, pi.length() - 4); diff --git a/tests/club/wpia/gigi/pages/account/TestCertificateAdd.java b/tests/club/wpia/gigi/pages/account/TestCertificateAdd.java index 16594e1b..21419d66 100644 --- a/tests/club/wpia/gigi/pages/account/TestCertificateAdd.java +++ b/tests/club/wpia/gigi/pages/account/TestCertificateAdd.java @@ -132,12 +132,12 @@ public class TestCertificateAdd extends ClientTest { byte[] cer = IOUtils.readURL(uc.getInputStream()); assertArrayEquals(cer, PEM.decode("CERTIFICATE", crt)); - uc = authenticate(new URL(huc.getHeaderField("Location") + ".cer?install&chain")); + uc = authenticate(new URL(huc.getHeaderField("Location") + ".cer?chain")); byte[] pkcs7 = IOUtils.readURL(uc.getInputStream()); PKCS7 p7 = new PKCS7(pkcs7); byte[] sub = verifyChain(p7.getCertificates()); assertArrayEquals(cer, sub); - assertEquals("application/x-x509-user-cert", uc.getHeaderField("Content-type")); + assertEquals("application/pkix-cert", uc.getHeaderField("Content-type")); uc = authenticate(new URL(huc.getHeaderField("Location"))); String gui = IOUtils.readURL(uc); -- 2.39.2