Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 3b6b2574d -> cf10da750
[CXF-5902] Minor fix to JweOutputStream Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/cf10da75 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/cf10da75 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/cf10da75 Branch: refs/heads/3.0.x-fixes Commit: cf10da7507a917b80130152eb382e5855fb07b4b Parents: 3b6b257 Author: Sergey Beryozkin <[email protected]> Authored: Sun Aug 3 21:22:57 2014 +0300 Committer: Sergey Beryozkin <[email protected]> Committed: Tue Aug 12 21:09:04 2014 +0100 ---------------------------------------------------------------------- .../org/apache/cxf/rs/security/oauth2/jwe/JweOutputStream.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/cf10da75/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwe/JweOutputStream.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwe/JweOutputStream.java b/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwe/JweOutputStream.java index 4730a51..8b8d915 100644 --- a/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwe/JweOutputStream.java +++ b/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwe/JweOutputStream.java @@ -77,6 +77,9 @@ public class JweOutputStream extends FilterOutputStream { private void encryptAndWrite(byte[] chunk, int off, int len) throws IOException { byte[] encrypted = encryptingCipher.update(chunk, off, len); + if (authTagProducer != null) { + authTagProducer.update(encrypted, 0, encrypted.length); + } encodeAndWrite(encrypted, 0, encrypted.length, false); } private void encodeAndWrite(byte[] encryptedChunk, int off, int len, boolean finalWrite) throws IOException {
