Sorry I forgot about this.
On Sep 4, 2007, at 11:17 AM, Andrew Haley wrote:
From: Andrew Haley <[EMAIL PROTECTED]>
Date: August 3, 2007 10:19:07 AM PDT
To: Casey Marshall <[EMAIL PROTECTED]>, [email protected]
Cc: Lillian Angel <[EMAIL PROTECTED]>
Subject: Fix DiffieHellmanImpl.java
I came across a problem with GNU Crypto that causes Diffie-Hellman key
exchange to fail when running on IcedTea. We're doing what looks to
me like an unnecessary check in DiffieHellmanImpl.engineDoPhase()
which can fail in some circumstances, and this is triggered when
running in IcedTea. The code runs correctly on Sun's Java 1.7, not on
the IcedTea version of Java 1.7, which uses GNU Crypto.
I think this is OK. I'm sure there are valid instances where the l
values won't match.
With IcedTea and Classpath we get:
Exception in thread "main" java.security.InvalidKeyException:
Incompatible key
at gnu.javax.crypto.jce.DiffieHellmanImpl.engineDoPhase
(DiffieHellmanImpl.java:99)
at javax.crypto.KeyAgreement.doPhase(KeyAgreement.java:224)
at Tt.main(Tt.java:35)
Here's my patch: