You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2014/06/25 23:03:28 UTC

git commit: Fixing oauth2 crypto tests

Repository: cxf
Updated Branches:
  refs/heads/master d014f6ac2 -> 856a0b9ef


Fixing oauth2 crypto tests


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/856a0b9e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/856a0b9e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/856a0b9e

Branch: refs/heads/master
Commit: 856a0b9ef124746bd51470a1b0f6f124e37cb1d7
Parents: d014f6a
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Wed Jun 25 22:03:10 2014 +0100
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Wed Jun 25 22:03:10 2014 +0100

----------------------------------------------------------------------
 .../apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/856a0b9e/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
index 99e46d8..76b62aa 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CryptoUtils.java
@@ -533,7 +533,7 @@ public final class CryptoUtils {
                 }
                 boolean updateRequired = keyProps != null && keyProps.getAdditionalData() != null;
                 int offset = 0;
-                for (; offset + blockSize <= bytes.length; offset += blockSize) {
+                for (; offset + blockSize < bytes.length; offset += blockSize) {
                     byte[] next = !updateRequired ? c.doFinal(bytes, offset, blockSize) 
                         : c.update(bytes, offset, blockSize);
                     result = addToResult(result, next);