[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNU Crypto] GNU Crypto with Java 5
From: |
Jonathan Anderson |
Subject: |
[GNU Crypto] GNU Crypto with Java 5 |
Date: |
Sat, 23 Apr 2005 14:07:25 -0230 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20050110) |
Hi,
I'm using the Java 5 SDK from Sun, and I had trouble compiling GNU Crypto.
According to the Java 5.0 API, getNegotiatedPropery(String) in both
javax.security.sasl.SaslClient and javax.security.sasl.SaslServer may
throw an IllegalStateException, but both gnu.crypto.sasl.ClientMechanism
and gnu.crypto.sasl.SeverMechanism throw an
IllegalMechanismStateException (which is a SaslException) instead.
I was able to get my setup compiling by making the following change in
both ServerMechanism.java (and an almost-identical one in ClientMechanism):
<diff>
<original>
public Object getNegotiatedProperty(final String propName)
throws SaslException {
if (!isComplete()) {
throw new IllegalMechanismStateException();
</original>
<modified>
public Object getNegotiatedProperty(final String propName)
throws IllegalStateException {
if (!isComplete()) {
throw new IllegalStateException("!ServerMechanism.isComplete()");
</modified>
</diff>
This doesn't seem to alter the spirit of the thing (and grepping through
the source couldn't find any "catch(SaslException" or "catch(Illegal"),
but hey, you're the experts!
#!/jon
--
Jonathan Anderson
address@hidden
- [GNU Crypto] GNU Crypto with Java 5,
Jonathan Anderson <=