JDK-7130948 : [macosx] Kerberos and JGSS JCK tests failing
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: unknown
  • Submitted: 2012-01-18
  • Updated: 2013-11-28
  • Resolved: 2012-04-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7u4 b11Fixed
Description
FAILED: api/javax_security/auth/kerberos/KerberosKey/index.html#Ctor1Tests
FAILED: api/javax_security/auth/kerberos/KerberosKey/index.html#Ctor2Tests
FAILED: api/javax_security/auth/kerberos/KerberosPrincipal/index.html#Ctor1Tests
FAILED: api/javax_security/auth/kerberos/KerberosPrincipal/index.html#Ctor2Tests
FAILED: api/javax_security/auth/kerberos/KerberosTicket/index.html#CtorTests
FAILED: api/javax_security/auth/kerberos/KerberosTicket/index.html#dateTests
FAILED: api/javax_security/auth/kerberos/KerberosTicket/index.html#destroyTests
FAILED: api/javax_security/auth/kerberos/KerberosTicket/index.html#flagsTests
FAILED: api/javax_security/auth/kerberos/KerberosTicket/index.html#refreshTests
FAILED: api/javax_security/auth/kerberos/KerberosTicket/index1.html#newEqualsHashCodeTests
FAILED: api/org_ietf/jgss/GSSContext/index.html#exportTest
FAILED: api/org_ietf/jgss/GSSContext/index.html#getDelegCredTest
FAILED: api/org_ietf/jgss/GSSContext/index.html#getMechTest
FAILED: api/org_ietf/jgss/GSSContext/index.html#getMICIOTest
FAILED: api/org_ietf/jgss/GSSContext/index.html#isInitiatorTest
FAILED: api/org_ietf/jgss/GSSContext/index.html#isProtReadyTest
FAILED: api/org_ietf/jgss/GSSContext/index.html#setCBTest
FAILED: api/org_ietf/jgss/GSSContext/index.html#wrapUnwrapIOTest
FAILED: api/org_ietf/jgss/GSSCredential/index.html#addTest
FAILED: api/org_ietf/jgss/GSSCredential/index.html#disposeTest
FAILED: api/org_ietf/jgss/GSSCredential/index.html#equalsTest
FAILED: api/org_ietf/jgss/GSSCredential/index.html#getMechsTest
FAILED: api/org_ietf/jgss/GSSContext/index.html#SetGetTests
FAILED: api/org_ietf/jgss/GSSManager/index.html#selfAuthenticate
FAILED: api/org_ietf/jgss/GSSCredential/index.html#getTests

Comments
SUGGESTED FIX diff -r 5492069e3f5e src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java --- a/src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java Tue Jan 17 03:33:33 2012 -0800 +++ b/src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java Wed Jan 18 02:27:01 2012 -0800 @@ -25,6 +25,7 @@ package sun.security.krb5; +import java.io.IOException; import java.util.Collection; import java.util.Hashtable; import java.util.Vector; @@ -81,13 +82,13 @@ * graph to the one that Kerberos Config in Java expects * * @return - * @throws KrbException + * @throws IOException */ @SuppressWarnings("unchecked") - public static Hashtable<String, Object> getConfig() throws KrbException { + public static Hashtable<String, Object> getConfig() throws IOException { Hashtable<String, Object> stanzaTable = getKerberosConfig(); if (stanzaTable == null) { - throw(new KrbException("Could not load configuration from SCDynamicStore")); + throw(new IOException("Could not load configuration from SCDynamicStore")); } //System.out.println("Raw map from JNI: " + stanzaTable);
18-01-2012

EVALUATION The Mac specific sun.security.krb5.SCDynamicStoreConfig class is throwing a Krb5Exception when it can't find its config file. It should be throwing an IOException which can be handled correctly by the calling code. Solution suggested by Max Wang.
18-01-2012