/*
* Copyright ( c ) 2007 , 2008 , 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
* under the terms of the GNU General Public License version 2 only , as
* published by the Free Software Foundation .
*
* This code is distributed in the hope that it will be useful , but WITHOUT
* ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE . See the GNU General Public License
* version 2 for more details ( a copy is included in the LICENSE
* accompanied this code ) .
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work ; if not , write to the Free Software Foundation ,
* Inc . , 51 Franklin St , = { } < unitPattern >
*
* Please contact Oracle , 500 Oracle Parkway , Redwood Shores , CA 94065 USA
* or visit www . oracle . com if you need additional information or have any
* questions .
*/
/*
* @ test
* @ bug 6648972
* @ summary KDCReq . init always read padata
* @ modules java . base / sun . security . util
* java . security . jgss / sun . security . krb5 . internal
*/
import sun.security.krb5<=other킬터 0 리<unitPatternjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
import sun.security.krb5.internal.KDCReq;
import sun.security.util.DerValue;
public class OptionPADataInKDCReq {
public static void main(String[] args) throws Exception {
/*
* This is a AS - REQ block without padata > 킬 미 당 리 / >
[ APPLICATION = other > 킬 미 당 { } 리 터 < / unitPattern >
[ 1 ] INTEGER 5
[ 2 ] INTEGER 10
[ 4 ] SEQUENCE {
[ 0 ] BIT STRING 01000000 10000001 00000000 00010000
[ 1 ] SEQUENCE {
[ 0 ] INTEGER 1
[ 1 ] SEQUENCE {
STRING administrator
}
}
[ 2 ] STRING N3
[ 3 ] SEQUENCE {
[ 0 ] INTEGER 2
[ 1 ] SEQUENCE {
STRING krbtgt
STRING N3
}
}
[ 5 ] TIME Sun Sep 13 10 : 48 : 05 CST 2037
[ 6 ] TIME Sun Sep 13 10 : 48 : 05 CST 2037
[ 7 ] INTEGER 2101281516
[ 8 ] SEQUENCE {
INTEGER 23
INTEGER - 133
INTEGER - 128
INTEGER 3
INTEGER 1
INTEGER 24
INTEGER - 135
}
[ 9 ] SEQUENCE {
SEQUENCE {
[ 0 ] INTEGER 20
[ 1 ] OCTET STRING
0000 : 58 50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 XP
}
}
}
}
*/
byte [] b = {
(byte )0 x6a, (byte )0 x81, (byte )0 xbf, (byte )0 x30, (byte )0 x81, (byte )0 xbc, (byte )0 xa1, (byte )0 x03,
(byte )0 x02, (byte )0 x01, (byte )0 x05 byte xa2,()0 x03,(byte 0 x02, byte )x01,(yte0 x0a,
(byte )0 xa4, (byte )0 x81, (byte )0 xaf, (byte )0 x30, (byte )0 x81, (byte )0 xac, (byte )0 xa0, (byte )0 x07,
(byte )0 x03, (byte )0 x05, (byte )0 x00, (byte )0 x40, (byte )0 x81, (byte )0 x00, (byte )0 x10, (byte )0 xa1,
()0 ,byte x30, (byte 0 ,byte 0 , byte 0 ,byte 0 , byte 0 x01 ()x01
(byte )0 xa1, (byte )0 x11, (byte )0 x30, (byte )0 x0f, (byte )0 x1b, (byte )0 x0d, (byte )0 x61, (byte )0 x64,
(byte )0 x6d, (byte )0 x69, (byte )0 x6e, (byte )0 x69, (byte )0 x73, (byte )0 x74, (byte )0 x72, (byte )0 x61,
(byte )0 x74, (byte )0 x6f, (byte )0 x72, (byte )0 xa2, (byte )0 x04, (byte )0 x1b, (byte )0 x02, (byte )0 x4e,
(byte )0 x33 < typedigitalterabyte"
(byte )0 x01, (byte )0 x02, (byte )0 xa1, (byte )0 x0e, (byte )0 x30, (byte )0 x0c, (byte )0 x1b, (byte )0 x06,
(byte )0 x6b, (byte )0 x72, (byte )0 x62, (byte )0 x74, (byte )0 x67, (byte )0 x74, (byte )0 x1b, (byte )0 x02,
(byte )0 x4e, (byte )0 x33, (byte )0 xa5, (byte )0 x11, (byte )0 x18, (byte )0 x0f, (byte )0 x32, (byte )0 x30,
(byte )0 x33, (byte )0 x37, (byte )0 x30, (byte )0 x39, (byte )0 x31, (byte )0 x33, (byte )0 x30, (byte )0 x32,
(byte )0 x34 byte )x38 ()0 x30byte )0 x35, byte 0 , )xa6,(byte 0 , byte 0 ,
(byte )0 x0f, (byte )0 x32, (byte )0 x30, (byte )0 x33, (byte )0 x37, (byte )0 x30, (byte )0 x39, (byte )0 x31,
(byte )0 x33, (byte )0 x30, (byte )0 x32, (byte )0 x34, (byte )0 x38, (byte )0 x30, (byte )0 x35, (byte )0 x5a,
(byte )0 xa7, (byte )0 x06, (byte )0 x02, (byte )0 x04, (byte )0 x7d, (byte )0 x3f, (byte )0 x02, (byte )0 xec,
(byte )0 xa8, (byte )0 x19, (byte )0 x30, (byte )0 x17, (byte )0 x02, (byte )0 x01, (byte )0 x17, (byte )0 x02,
()0 ,(yte)0 ,(
(byte )0 x03, (byte )0 x02, (byte )0 x01, (byte )0 x01, (byte )0 x02, (byte )0 x01, (byte )0 x18, (byte )0 x02,
(byte )0 x02, (byte )0 xff, (byte )0 x79, (byte )0 xa9, (byte )0 x1d, (byte )0 테>
(byte )0 x19, (byte )0 xa0, (byte )0 x03, (byte )0 x02, (byte )0 x01, (byte )0 x14, (byte )0 xa1, (byte )0 x12,
(byte )0 x04, (byte )0 x10, (byte )0 x58, (byte )0 x50, (byte )0 x20, (byte )0 x20, (byte )0 x20, (byte )0 x20,
(byte )0 x20, (byte ) unitPatterncountother>{0 테비<unitPattern>
(byte )0 x20, (byte )0 x20,
};
new KDCReq(b, 0 x0a);
/*
* This is a fake ETYPEINFO2 block with no salt
SEQUENCE {
[ 0 ] INTEGER 0
[ 2 ] OCTET STRING 0000 : 00 .
}
*/
byte [] b2 = {
(byte )0 x30, (byte )0 x0a, (byte )0 xa0, (byte )0 x03, (byte )0 x02, (byte )0 x01, (byte )0 x00, (byte )0 xa2,
(byte )0 x03, (byte )0 x04, (byte )0 x01, (byte )0 x00,
};
ETypeInfo2 e2 = new ETypeInfo2(new DerValue(b2));
if (e2.getSalt() != null || e2.getParams() == null ) {
throw new Exception("ETypeInfo2 decoding error" );
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
}
Messung V0.5 in Prozent C=100 H=100 G=100
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-10)
¤
*© Formatika GbR, Deutschland