]> source.dussan.org Git - gitblit.git/commitdiff
Include user's public cert and ca public cert, individually, in bundle
authorJames Moger <james.moger@gitblit.com>
Fri, 30 Nov 2012 21:18:04 +0000 (16:18 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 30 Nov 2012 21:18:04 +0000 (16:18 -0500)
src/com/gitblit/utils/X509Utils.java

index 7a402dac1428c88281855b9128ab1f998b136371..cfad9ec0be06e6a73fd5979aa6907c9840c9a181 100644 (file)
@@ -759,6 +759,17 @@ public class X509Utils {
                                zos.write(FileUtils.readContent(pemFile));\r
                                zos.closeEntry();\r
                        }\r
+                       \r
+                       // include user's public certificate\r
+                       zos.putNextEntry(new ZipEntry(clientMetadata.commonName + ".cer"));\r
+                       zos.write(cert.getEncoded());\r
+                       zos.closeEntry();\r
+                       \r
+                       // include CA public certificate\r
+                       zos.putNextEntry(new ZipEntry("ca.cer"));\r
+                       zos.write(caCert.getEncoded());\r
+                       zos.closeEntry();\r
+                       \r
                        if (readme != null) {\r
                                zos.putNextEntry(new ZipEntry("README.TXT"));\r
                                zos.write(readme.getBytes("UTF-8"));\r