Updated Branches: refs/heads/master d9ab7f8df -> 555303e17
[SSHD-273] Add RFC 6668 (HMAC SHA-2) support Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/555303e1 Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/555303e1 Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/555303e1 Branch: refs/heads/master Commit: 555303e1751a39e90d338072c0e9de5b3d0ae0f8 Parents: d9ab7f8 Author: Guillaume Nodet <[email protected]> Authored: Fri Jan 24 11:44:44 2014 +0100 Committer: Guillaume Nodet <[email protected]> Committed: Fri Jan 24 11:44:44 2014 +0100 ---------------------------------------------------------------------- .../main/java/org/apache/sshd/common/session/AbstractSession.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/555303e1/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java index cb01ca1..61666a9 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java @@ -838,6 +838,7 @@ public abstract class AbstractSession implements Session { s2ccipher.init(isServer ? Cipher.Mode.Encrypt : Cipher.Mode.Decrypt, Es2c, IVs2c); s2cmac = NamedFactory.Utils.create(factoryManager.getMacFactories(), negociated[SshConstants.PROPOSAL_MAC_ALGS_STOC]); + MACs2c = resizeKey(MACs2c, s2cmac.getBlockSize(), hash, K, H); s2cmac.init(MACs2c); c2scipher = NamedFactory.Utils.create(factoryManager.getCipherFactories(), negociated[SshConstants.PROPOSAL_ENC_ALGS_CTOS]); @@ -845,6 +846,7 @@ public abstract class AbstractSession implements Session { c2scipher.init(isServer ? Cipher.Mode.Decrypt : Cipher.Mode.Encrypt, Ec2s, IVc2s); c2smac = NamedFactory.Utils.create(factoryManager.getMacFactories(), negociated[SshConstants.PROPOSAL_MAC_ALGS_CTOS]); + MACc2s = resizeKey(MACc2s, c2smac.getBlockSize(), hash, K, H); c2smac.init(MACc2s); s2ccomp = NamedFactory.Utils.create(factoryManager.getCompressionFactories(), negociated[SshConstants.PROPOSAL_COMP_ALGS_STOC]);
