[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU Crypto] GNU Crypto with Java 5
From: |
Casey Marshall |
Subject: |
Re: [GNU Crypto] GNU Crypto with Java 5 |
Date: |
Tue, 26 Apr 2005 18:10:09 -0700 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
>>>>> "Jonathan" == Jonathan Anderson <address@hidden> writes:
Jonathan> Hi,
Jonathan> I'm using the Java 5 SDK from Sun, and I had trouble
Jonathan> compiling GNU Crypto.
Jonathan> According to the Java 5.0 API, getNegotiatedPropery(String)
Jonathan> in both javax.security.sasl.SaslClient and
Jonathan> javax.security.sasl.SaslServer may throw an
Jonathan> IllegalStateException, but both
Jonathan> gnu.crypto.sasl.ClientMechanism and
Jonathan> gnu.crypto.sasl.SeverMechanism throw an
Jonathan> IllegalMechanismStateException (which is a SaslException)
Jonathan> instead.
Jonathan> I was able to get my setup compiling by making the following
Jonathan> change in both ServerMechanism.java (and an almost-identical
Jonathan> one in ClientMechanism):
Jonathan> <diff>
Jonathan> <original>
Jonathan> public Object getNegotiatedProperty(final String propName)
Jonathan> throws SaslException {
Jonathan> if (!isComplete()) {
Jonathan> throw new IllegalMechanismStateException();
Jonathan> </original>
Jonathan> <modified>
Jonathan> public Object getNegotiatedProperty(final String propName)
Jonathan> throws IllegalStateException {
Jonathan> if (!isComplete()) {
Jonathan> throw new
IllegalStateException("!ServerMechanism.isComplete()");
Jonathan> </modified>
Jonathan> </diff>
Jonathan> This doesn't seem to alter the spirit of the thing (and
Jonathan> grepping through the source couldn't find any
Jonathan> "catch(SaslException" or "catch(Illegal"), but hey, you're
Jonathan> the experts!
Yeah, the javax.security.sasl API in GNU Crypto is (I think) an
earlier version than the one in Java 5, and diverges a little.
I should put out a patch release to 2.0, but don't usually have the
time.
--
Casey Marshall || address@hidden