7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 /* 24 * @test 25 * @bug 6682516 26 * @summary SPNEGO_HTTP_AUTH/WWW_KRB and SPNEGO_HTTP_AUTH/WWW_SPNEGO failed on all non-windows platforms 27 * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Djava.security.krb5.conf=krb5.conf Test 28 */ 29 30 import java.net.InetAddress; 31 import java.net.UnknownHostException; 32 import sun.net.spi.nameservice.NameService; 33 import sun.net.spi.nameservice.NameServiceDescriptor; 34 import sun.security.krb5.PrincipalName; 35 36 public class Test implements NameServiceDescriptor { 37 public static void main(String[] args) throws Exception { 38 // This config file is generated using Kerberos.app on a Mac 39 System.setProperty("java.security.krb5.realm", "THIS.REALM"); 40 System.setProperty("java.security.krb5.kdc", "localhost"); 41 42 // add using canonicalized name 43 check("c1", "c1.this.domain"); 44 check("c1.this", "c1.this.domain"); 45 check("c1.this.domain", "c1.this.domain"); 46 | 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 /* 24 * @test 25 * @bug 6682516 26 * @summary SPNEGO_HTTP_AUTH/WWW_KRB and SPNEGO_HTTP_AUTH/WWW_SPNEGO failed on all non-windows platforms 27 * @modules java.base/sun.net.spi.nameservice 28 * java.security.jgss/sun.security.krb5 29 * @run main/othervm -Dsun.net.spi.nameservice.provider.1=ns,mock -Djava.security.krb5.conf=krb5.conf Test 30 */ 31 32 import java.net.InetAddress; 33 import java.net.UnknownHostException; 34 import sun.net.spi.nameservice.NameService; 35 import sun.net.spi.nameservice.NameServiceDescriptor; 36 import sun.security.krb5.PrincipalName; 37 38 public class Test implements NameServiceDescriptor { 39 public static void main(String[] args) throws Exception { 40 // This config file is generated using Kerberos.app on a Mac 41 System.setProperty("java.security.krb5.realm", "THIS.REALM"); 42 System.setProperty("java.security.krb5.kdc", "localhost"); 43 44 // add using canonicalized name 45 check("c1", "c1.this.domain"); 46 check("c1.this", "c1.this.domain"); 47 check("c1.this.domain", "c1.this.domain"); 48 |