From 99d00579ec14079cba2dff7b48a3a4555be9017f Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 30 Nov 2012 16:18:04 -0500 Subject: [PATCH] Include user's public cert and ca public cert, individually, in bundle --- src/com/gitblit/utils/X509Utils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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")); -- 2.39.5