test/sun/security/krb5/auto/BasicKrb5Test.java
Print this page
rev 7199 : 8014310: JAAS/Krb5LoginModule using des encytypes failure with NPE after JDK-8012679
*** 57,66 ****
--- 57,67 ----
*/
import org.ietf.jgss.GSSName;
import sun.security.jgss.GSSUtil;
import sun.security.krb5.Config;
+ import sun.security.krb5.KrbException;
import sun.security.krb5.internal.crypto.EType;
/**
* Basic JGSS/krb5 test with 3 parties: client, server, backend server. Each
* party uses JAAS login to get subjects and executes JGSS calls using
*** 82,97 ****
else etype = arg;
}
// Creates and starts the KDC. This line must be put ahead of etype check
// since the check needs a krb5.conf.
new OneKDC(etype).writeJAASConf();
!
! System.out.println("Testing etype " + etype);
! if (etype != null && !EType.isSupported(Config.getType(etype))) {
! // aes256 is not enabled on all systems
! System.out.println("Not supported.");
return;
}
new BasicKrb5Test().go(OneKDC.SERVER, OneKDC.BACKEND);
}
--- 83,96 ----
else etype = arg;
}
// Creates and starts the KDC. This line must be put ahead of etype check
// since the check needs a krb5.conf.
+ try {
new OneKDC(etype).writeJAASConf();
! } catch (KrbException ke) {
! System.out.println("Testing etype " + etype + "Not supported.");
return;
}
new BasicKrb5Test().go(OneKDC.SERVER, OneKDC.BACKEND);
}