Repository: cxf Updated Branches: refs/heads/master 43aa45546 -> 13893abc4
[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/13893abc Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/13893abc Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/13893abc Branch: refs/heads/master Commit: 13893abc426bbc3143c47aff681534ea70ef543c Parents: 43aa455 Author: Sergey Beryozkin <[email protected]> Authored: Sun Aug 3 21:22:57 2014 +0300 Committer: Sergey Beryozkin <[email protected]> Committed: Sun Aug 3 21:22:57 2014 +0300 ---------------------------------------------------------------------- .../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/13893abc/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 {
