From: James Moger Date: Fri, 30 Nov 2012 21:18:04 +0000 (-0500) Subject: Include user's public cert and ca public cert, individually, in bundle X-Git-Tag: v1.2.0~50 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=99d00579ec14079cba2dff7b48a3a4555be9017f;p=gitblit.git Include user's public cert and ca public cert, individually, in bundle --- diff --git a/src/com/gitblit/utils/X509Utils.java b/src/com/gitblit/utils/X509Utils.java index 7a402dac..cfad9ec0 100644 --- a/src/com/gitblit/utils/X509Utils.java +++ b/src/com/gitblit/utils/X509Utils.java @@ -759,6 +759,17 @@ public class X509Utils { zos.write(FileUtils.readContent(pemFile)); zos.closeEntry(); } + + // include user's public certificate + zos.putNextEntry(new ZipEntry(clientMetadata.commonName + ".cer")); + zos.write(cert.getEncoded()); + zos.closeEntry(); + + // include CA public certificate + zos.putNextEntry(new ZipEntry("ca.cer")); + zos.write(caCert.getEncoded()); + zos.closeEntry(); + if (readme != null) { zos.putNextEntry(new ZipEntry("README.TXT")); zos.write(readme.getBytes("UTF-8"));