diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-08-12 22:30:55 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-08-12 22:30:55 +0000 |
commit | 2c810ef59ec94f8bdcc492e8a28453597b43a91c (patch) | |
tree | 1dcfcc6a27d20be6481d1e9390173b94cb957dce /pki/base/common/src/com/netscape/cms/servlet/cert | |
parent | 92aef4a7181de06eec17d8f9184eba977b01d7e4 (diff) | |
download | pki-2c810ef59ec94f8bdcc492e8a28453597b43a91c.tar.gz pki-2c810ef59ec94f8bdcc492e8a28453597b43a91c.tar.xz pki-2c810ef59ec94f8bdcc492e8a28453597b43a91c.zip |
Fixed bugzilla bug #513450
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@753 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/servlet/cert')
-rw-r--r-- | pki/base/common/src/com/netscape/cms/servlet/cert/GetCAChain.java | 19 |
1 files changed, 12 insertions, 7 deletions
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); |