United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7130948 [macosx] Kerberos and JGSS JCK tests failing
JDK-7130948 : [macosx] Kerberos and JGSS JCK tests failing

Details
Type:
Bug
Submit Date:
2012-01-18
Status:
Closed
Updated Date:
2013-11-28
Project Name:
JDK
Resolved Date:
2012-04-09
Component:
security-libs
OS:
os_x
Sub-Component:
java.security
CPU:
unknown
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u4 (b11)

Related Reports

Sub Tasks

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
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.
                                     
2012-01-18
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);
                                     
2012-01-18



Hardware and Software, Engineered to Work Together