From 2c810ef59ec94f8bdcc492e8a28453597b43a91c Mon Sep 17 00:00:00 2001 From: awnuk Date: Wed, 12 Aug 2009 22:30:55 +0000 Subject: Fixed bugzilla bug #513450 git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@753 c9f7a03b-bd48-0410-a16d-cbbf54688b0b --- .../src/com/netscape/cms/servlet/cert/GetCAChain.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'pki') diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java b/pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java index 3dec251b8..ca1a3c159 100644 --- a/pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java +++ b/pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java @@ -165,7 +165,7 @@ * the whole chain. */ - if (clientIsMSIE(httpReq) && op.equals("download")) { + if (clientIsMSIE(httpReq) && (op.equals("download") || op.equals("downloadBIN"))) { X509Certificate[] caCerts = ((ICertAuthority) mAuthority).getCACertChain().getChain(); @@ -202,7 +202,7 @@ String mimeType = null; - if (op.equals("downloadBIN")) { + if (op.equals("download") || op.equals("downloadBIN")) { mimeType = "application/octet-stream"; } else { try { @@ -213,11 +213,16 @@ } try { - if (clientIsMSIE(httpReq)) { - if (op.equals("downloadBIN")) { - httpResp.setHeader("Content-disposition", - "attachment; filename=getCAChain.cacert"); - } + if (op.equals("download") || op.equals("downloadBIN")) { + // file suffixes changed to comply with RFC 5280 + // requirements for AIA extensions + if (clientIsMSIE(httpReq)) { + httpResp.setHeader("Content-disposition", + "attachment; filename=ca.cer"); + } else { + httpResp.setHeader("Content-disposition", + "attachment; filename=ca.p7c"); + } } httpResp.setContentType(mimeType); httpResp.getOutputStream().write(bytes); -- cgit