SPNEGO - GSSManger.createContext() -> 'Operation unavailable'

SPNEGO - when I try this with Java version "1.6.0-rc", I end up with a GSSException with the message "Operation unavailable". How do I get more information about what this exactly means?

--

Specifically, I have a string starting with -

YIIGPwYGKwYBBQUCoIIGMzCCBi+gJDAiBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKwYBBAGCNwICCq...

This includes an usage of the OID "1.3.6.1.5.5.2" (Microsoft SPNEGO). I decode this string (BASE64) and feed the resulting byte-array into this method of mine:

protected GSSContext getContext(byte[] in)

throws

GSSException

{

GSSContext res=null;

{

if (in!=null)

{

try

{

GSSManager manager=GSSManager.getInstance();

Oid[] mechs=manager.getMechs();

System.out.println("Mechs:> "+mechs+", "+Arrays.toString(mechs));

res=manager.createContext(in);<- CODE FAILS HERE!

}

catch(GSSException ex)

{

ex.printStackTrace(System.out);

}

}

}

return res;

}

At runtime, this code fails with this output:

Mechs:> [Lorg.ietf.jgss.Oid;@14f0fb4, [1.3.6.1.5.5.2, 1.2.840.113554.1.2.2]

GSSException: Operation unavailable

at sun.security.jgss.GSSManagerImpl.getMechanismContext(Unknown Source)

at sun.security.jgss.GSSContextImpl.<init>(Unknown Source)

at sun.security.jgss.GSSManagerImpl.createContext(Unknown Source)

at <my code>

...

What does "Operation unavailable" mean?

What exactly is the complaint?

Anything to turn on to get some real debug-information?

--

Regards

Morten Sabroe Mortensen

[2282 byte] By [Morten.Mortensena] at [2007-10-3 11:22:26]
# 1
I got some similar error when using java 1.6.0. My Tokens start with YIICGgYJKoZIhvcSAQICAQBuggIJMIICBaADAgEFoQMCAQ6iBwMFAAAAAACjggEhYYIBHTCCARmThis String contains a krb5 oid.
wiencznya at 2007-7-15 13:47:46 > top of Java-index,Security,Kerberos & Java GSS (JGSS)...