+ } else if (req.getParameter("bundle") != null && root != null) {
+ resp.setContentType("application/x-x509-ca-cert");
+ resp.setHeader("Content-Disposition", "attachment; filename=\"" + appName + "_intermediate_bundle.p7b\"");
+ ServletOutputStream out = resp.getOutputStream();
+ try {
+ CertExporter.writeCertBundle(out);
+ } catch (CertificateEncodingException e) {
+ e.printStackTrace();
+ } catch (GeneralSecurityException e) {
+ e.printStackTrace();
+ } catch (GigiApiException e) {
+ e.printStackTrace();
+ }
+ return true;