6997740: ktab entry related test compilation error
authorweijun
Sat, 06 Nov 2010 09:11:18 +0800
changeset 7172 01308fd663b3
parent 7171 ee97f78e7482
child 7173 bc8e9befba44
child 7177 0113db4feebc
6997740: ktab entry related test compilation error Reviewed-by: valeriep
jdk/test/sun/security/krb5/auto/MoreKvno.java
jdk/test/sun/security/krb5/auto/SSL.java
jdk/test/sun/security/krb5/auto/W83.java
jdk/test/sun/security/krb5/ktab/KeyTabIndex.java
--- a/jdk/test/sun/security/krb5/auto/MoreKvno.java	Fri Nov 05 14:15:25 2010 -0700
+++ b/jdk/test/sun/security/krb5/auto/MoreKvno.java	Sat Nov 06 09:11:18 2010 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,9 +48,9 @@
         KeyTab ktab = KeyTab.create(OneKDC.KTAB);
         p = new PrincipalName(
             OneKDC.SERVER+"@"+OneKDC.REALM, PrincipalName.KRB_NT_SRV_HST);
-        ktab.addEntry(p, "pass1".toCharArray(), 1);
-        ktab.addEntry(p, "pass3".toCharArray(), 3);
-        ktab.addEntry(p, "pass2".toCharArray(), 2);
+        ktab.addEntry(p, "pass1".toCharArray(), 1, true);
+        ktab.addEntry(p, "pass3".toCharArray(), 3, true);
+        ktab.addEntry(p, "pass2".toCharArray(), 2, true);
         ktab.save();
 
         char[] pass = "pass2".toCharArray();
--- a/jdk/test/sun/security/krb5/auto/SSL.java	Fri Nov 05 14:15:25 2010 -0700
+++ b/jdk/test/sun/security/krb5/auto/SSL.java	Sat Nov 06 09:11:18 2010 +0800
@@ -74,9 +74,9 @@
         KeyTab ktab = KeyTab.create(OneKDC.KTAB);
         PrincipalName service = new PrincipalName(
                 "host/" + server, PrincipalName.KRB_NT_SRV_HST);
-        ktab.addEntry(service, "pass1".toCharArray(), 1);
-        ktab.addEntry(service, "pass2".toCharArray(), 2);
-        ktab.addEntry(service, "pass3".toCharArray(), 3);
+        ktab.addEntry(service, "pass1".toCharArray(), 1, true);
+        ktab.addEntry(service, "pass2".toCharArray(), 2, true);
+        ktab.addEntry(service, "pass3".toCharArray(), 3, true);
         ktab.save();
 
         // and use the middle one as the real key
--- a/jdk/test/sun/security/krb5/auto/W83.java	Fri Nov 05 14:15:25 2010 -0700
+++ b/jdk/test/sun/security/krb5/auto/W83.java	Sat Nov 06 09:11:18 2010 +0800
@@ -56,7 +56,7 @@
         KeyTab ktab = KeyTab.getInstance(OneKDC.KTAB);
         for (int etype: EType.getBuiltInDefaults()) {
             if (etype != EncryptedData.ETYPE_ARCFOUR_HMAC) {
-                ktab.deleteEntry(new PrincipalName(OneKDC.USER), etype);
+                ktab.deleteEntries(new PrincipalName(OneKDC.USER), etype, -1);
             }
         }
         ktab.save();
--- a/jdk/test/sun/security/krb5/ktab/KeyTabIndex.java	Fri Nov 05 14:15:25 2010 -0700
+++ b/jdk/test/sun/security/krb5/ktab/KeyTabIndex.java	Sat Nov 06 09:11:18 2010 +0800
@@ -35,8 +35,8 @@
         // observice the abnormal change of "index" field.
         kt.addEntry(new PrincipalName(
                 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@A"),
-                "x".toCharArray(), 1);
-        kt.addEntry(new PrincipalName("a@A"), "x".toCharArray(), 1);
+                "x".toCharArray(), 1, true);
+        kt.addEntry(new PrincipalName("a@A"), "x".toCharArray(), 1, true);
         kt.save();
         Runnable t = new Runnable() {
             @Override