cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-6616) need always close the CipherOutputStream when the encryption is done to get the complete content
Date Tue, 29 Sep 2015 09:02:04 GMT

     [ https://issues.apache.org/jira/browse/CXF-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Freeman Fang resolved CXF-6616.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 3.1.4
                   3.0.7

commit fix
http://git-wip-us.apache.org/repos/asf/cxf/commit/d644f01c for 3.0.x-fixes branch
http://git-wip-us.apache.org/repos/asf/cxf/commit/8eb78c39 for master

> need always close the CipherOutputStream when the encryption is done to get the complete
content 
> -------------------------------------------------------------------------------------------------
>
>                 Key: CXF-6616
>                 URL: https://issues.apache.org/jira/browse/CXF-6616
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 3.0.7, 3.1.4
>
>
> The flush method of CipherOutputStream can't guarantee to flush all content, the java
doc says
> {code}
> Flushes this output stream by forcing any buffered output bytes that have already been
processed by the encapsulated cipher object to be written out.
>  
> Any bytes buffered by the encapsulated cipher and waiting to be processed by it will
not be written out. For example, if the encapsulated cipher is a block cipher, and the total
number of bytes written using one of the write methods is less than the cipher's block size,
no bytes will be written out.
> {code}
> So the behavior could vary depend on different platforms/JVMs, I can see CachedWriterTest
and CachedOutputStreamTest failed(when CipherOutputStream is used) on some platform due to
miss the  last padding of the encrypt content 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message