final class sun.security.ssl.HelloCookieManager
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: sun.security.ssl.HelloCookieManager
super_class: java.lang.Object
{
private static long COOKIE_TIMING_WINDOW;
descriptor: J
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static int COOKIE_MAX_LENGTH_DTLS10;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static int COOKIE_MAX_LENGTH_DTLS12;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private final java.security.SecureRandom secureRandom;
descriptor: Ljava/security/SecureRandom;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.security.MessageDigest cookieDigest;
descriptor: Ljava/security/MessageDigest;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private int cookieVersion;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private long secretLifetime;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private byte[] cookieSecret;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private int prevCookieVersion;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private byte[] prevCookieSecret;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc 3600000
putstatic sun.security.ssl.HelloCookieManager.COOKIE_TIMING_WINDOW:J
1: bipush 32
putstatic sun.security.ssl.HelloCookieManager.COOKIE_MAX_LENGTH_DTLS10:I
2: sipush 255
putstatic sun.security.ssl.HelloCookieManager.COOKIE_MAX_LENGTH_DTLS12:I
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(java.security.SecureRandom);
descriptor: (Ljava/security/SecureRandom;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield sun.security.ssl.HelloCookieManager.secureRandom:Ljava/security/SecureRandom;
2: aload 0
ldc "SHA-256"
invokestatic sun.security.ssl.JsseJce.getMessageDigest:(Ljava/lang/String;)Ljava/security/MessageDigest;
putfield sun.security.ssl.HelloCookieManager.cookieDigest:Ljava/security/MessageDigest;
3: aload 0
aload 1
invokevirtual java.security.SecureRandom.nextInt:()I
putfield sun.security.ssl.HelloCookieManager.cookieVersion:I
4: aload 0
lconst_0
putfield sun.security.ssl.HelloCookieManager.secretLifetime:J
5: aload 0
aconst_null
putfield sun.security.ssl.HelloCookieManager.cookieSecret:[B
6: aload 0
iconst_0
putfield sun.security.ssl.HelloCookieManager.prevCookieVersion:I
7: aload 0
aconst_null
putfield sun.security.ssl.HelloCookieManager.prevCookieSecret:[B
8: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lsun/security/ssl/HelloCookieManager;
0 9 1 secureRandom Ljava/security/SecureRandom;
MethodParameters:
Name Flags
secureRandom
synchronized byte[] getCookie(sun.security.ssl.HandshakeMessage$ClientHello);
descriptor: (Lsun/security/ssl/HandshakeMessage$ClientHello;)[B
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.ssl.HelloCookieManager.secretLifetime:J
invokestatic java.lang.System.currentTimeMillis:()J
lcmp
ifge 9
1: aload 0
getfield sun.security.ssl.HelloCookieManager.cookieSecret:[B
ifnull 5
2: aload 0
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieVersion:I
putfield sun.security.ssl.HelloCookieManager.prevCookieVersion:I
3: aload 0
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieSecret:[B
invokevirtual byte[].clone:()Ljava/lang/Object;
checkcast byte[]
putfield sun.security.ssl.HelloCookieManager.prevCookieSecret:[B
4: goto 6
5: StackMap locals:
StackMap stack:
aload 0
bipush 32
newarray 8
putfield sun.security.ssl.HelloCookieManager.cookieSecret:[B
6: StackMap locals:
StackMap stack:
aload 0
dup
getfield sun.security.ssl.HelloCookieManager.cookieVersion:I
iconst_1
iadd
putfield sun.security.ssl.HelloCookieManager.cookieVersion:I
7: aload 0
getfield sun.security.ssl.HelloCookieManager.secureRandom:Ljava/security/SecureRandom;
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieSecret:[B
invokevirtual java.security.SecureRandom.nextBytes:([B)V
8: aload 0
invokestatic java.lang.System.currentTimeMillis:()J
getstatic sun.security.ssl.HelloCookieManager.COOKIE_TIMING_WINDOW:J
ladd
putfield sun.security.ssl.HelloCookieManager.secretLifetime:J
9: StackMap locals:
StackMap stack:
aload 1
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieDigest:Ljava/security/MessageDigest;
invokevirtual sun.security.ssl.HandshakeMessage$ClientHello.updateHelloCookie:(Ljava/security/MessageDigest;)V
10: aload 0
getfield sun.security.ssl.HelloCookieManager.cookieDigest:Ljava/security/MessageDigest;
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieSecret:[B
invokevirtual java.security.MessageDigest.digest:([B)[B
astore 2
start local 2 11: aload 2
iconst_0
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieVersion:I
bipush 24
ishr
sipush 255
iand
i2b
bastore
12: aload 2
iconst_1
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieVersion:I
bipush 16
ishr
sipush 255
iand
i2b
bastore
13: aload 2
iconst_2
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieVersion:I
bipush 8
ishr
sipush 255
iand
i2b
bastore
14: aload 2
iconst_3
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieVersion:I
sipush 255
iand
i2b
bastore
15: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lsun/security/ssl/HelloCookieManager;
0 16 1 clientHelloMsg Lsun/security/ssl/HandshakeMessage$ClientHello;
11 16 2 cookie [B
MethodParameters:
Name Flags
clientHelloMsg
synchronized boolean isValid(sun.security.ssl.HandshakeMessage$ClientHello);
descriptor: (Lsun/security/ssl/HandshakeMessage$ClientHello;)Z
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=3, locals=7, args_size=2
start local 0 start local 1 0: aload 1
getfield sun.security.ssl.HandshakeMessage$ClientHello.cookie:[B
astore 2
start local 2 1: aload 2
ifnull 2
aload 2
arraylength
bipush 32
if_icmpeq 3
2: StackMap locals: byte[]
StackMap stack:
iconst_0
ireturn
3: StackMap locals:
StackMap stack:
aload 2
iconst_0
baload
sipush 255
iand
bipush 24
ishl
4: aload 2
iconst_1
baload
sipush 255
iand
bipush 16
ishl
5: ior
6: aload 2
iconst_2
baload
sipush 255
iand
bipush 8
ishl
7: ior
8: aload 2
iconst_3
baload
sipush 255
iand
9: ior
istore 3
start local 3 10: iload 3
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieVersion:I
if_icmpne 13
11: aload 0
getfield sun.security.ssl.HelloCookieManager.cookieSecret:[B
astore 4
start local 4 12: goto 17
end local 4 StackMap locals: int
StackMap stack:
13: iload 3
aload 0
getfield sun.security.ssl.HelloCookieManager.prevCookieVersion:I
if_icmpne 16
14: aload 0
getfield sun.security.ssl.HelloCookieManager.prevCookieSecret:[B
astore 4
start local 4 15: goto 17
end local 4 16: StackMap locals:
StackMap stack:
iconst_0
ireturn
start local 4 17: StackMap locals: byte[]
StackMap stack:
aload 1
aload 0
getfield sun.security.ssl.HelloCookieManager.cookieDigest:Ljava/security/MessageDigest;
invokevirtual sun.security.ssl.HandshakeMessage$ClientHello.updateHelloCookie:(Ljava/security/MessageDigest;)V
18: aload 0
getfield sun.security.ssl.HelloCookieManager.cookieDigest:Ljava/security/MessageDigest;
aload 4
invokevirtual java.security.MessageDigest.digest:([B)[B
astore 5
start local 5 19: iconst_4
istore 6
start local 6 20: goto 24
21: StackMap locals: byte[] int
StackMap stack:
aload 2
iload 6
baload
aload 5
iload 6
baload
if_icmpeq 23
22: iconst_0
ireturn
23: StackMap locals:
StackMap stack:
iinc 6 1
StackMap locals:
StackMap stack:
24: iload 6
bipush 32
if_icmplt 21
end local 6 25: iconst_1
ireturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lsun/security/ssl/HelloCookieManager;
0 26 1 clientHelloMsg Lsun/security/ssl/HandshakeMessage$ClientHello;
1 26 2 cookie [B
10 26 3 version I
12 13 4 secret [B
15 16 4 secret [B
17 26 4 secret [B
19 26 5 target [B
20 25 6 i I
MethodParameters:
Name Flags
clientHelloMsg
static void checkCookie(sun.security.ssl.ProtocolVersion, byte[]);
descriptor: (Lsun/security/ssl/ProtocolVersion;[B)V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ifnull 9
aload 1
arraylength
ifeq 9
1: aload 0
getfield sun.security.ssl.ProtocolVersion.v:I
getstatic sun.security.ssl.ProtocolVersion.DTLS10:Lsun/security/ssl/ProtocolVersion;
getfield sun.security.ssl.ProtocolVersion.v:I
if_icmpne 3
2: getstatic sun.security.ssl.HelloCookieManager.COOKIE_MAX_LENGTH_DTLS10:I
pop
3: StackMap locals:
StackMap stack:
aload 1
arraylength
getstatic sun.security.ssl.HelloCookieManager.COOKIE_MAX_LENGTH_DTLS10:I
if_icmple 9
4: new javax.net.ssl.SSLProtocolException
dup
5: new java.lang.StringBuilder
dup
ldc "Invalid HelloVerifyRequest.cookie (length = "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
6: aload 1
arraylength
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bytes)"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
7: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
8: invokespecial javax.net.ssl.SSLProtocolException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 protocolVersion Lsun/security/ssl/ProtocolVersion;
0 10 1 cookie [B
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
protocolVersion
cookie
}
SourceFile: "HelloCookieManager.java"
InnerClasses:
final ClientHello = sun.security.ssl.HandshakeMessage$ClientHello of sun.security.ssl.HandshakeMessage