changeset 2413:2306564dea3a

6948287: KDC test strange knvo Reviewed-by: xuelei
author weijun
date Tue, 25 May 2010 18:20:54 +0800
parents d1cf79e27365
children dfa98add4ad0
files test/sun/security/krb5/auto/KDC.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/krb5/auto/KDC.java	Mon May 24 16:41:03 2010 -0400
+++ b/test/sun/security/krb5/auto/KDC.java	Tue May 25 18:20:54 2010 +0800
@@ -403,8 +403,11 @@
      */
     private static char[] randomPassword() {
         char[] pass = new char[32];
-        for (int i=0; i<32; i++)
+        for (int i=0; i<31; i++)
             pass[i] = (char)secureRandom.nextInt();
+        // The last char cannot be a number, otherwise, keyForUser()
+        // believes it's a sign of kvno
+        pass[31] = 'Z';
         return pass;
     }