final class com.sun.security.sasl.CramMD5Server extends com.sun.security.sasl.CramMD5Base implements javax.security.sasl.SaslServer
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.sun.security.sasl.CramMD5Server
super_class: com.sun.security.sasl.CramMD5Base
{
private java.lang.String fqdn;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private byte[] challengeData;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private java.lang.String authzid;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private javax.security.auth.callback.CallbackHandler cbh;
descriptor: Ljavax/security/auth/callback/CallbackHandler;
flags: (0x0002) ACC_PRIVATE
void <init>(java.lang.String, java.lang.String, java.util.Map<java.lang.String, ?>, javax.security.auth.callback.CallbackHandler);
descriptor: (Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljavax/security/auth/callback/CallbackHandler;)V
flags: (0x0000)
Code:
stack=3, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
invokespecial com.sun.security.sasl.CramMD5Base.<init>:()V
1: aload 0
aconst_null
putfield com.sun.security.sasl.CramMD5Server.challengeData:[B
2: aload 2
ifnonnull 6
3: new javax.security.sasl.SaslException
dup
4: ldc "CRAM-MD5: fully qualified server name must be specified"
5: invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals: com.sun.security.sasl.CramMD5Server java.lang.String java.lang.String java.util.Map javax.security.auth.callback.CallbackHandler
StackMap stack:
aload 0
aload 2
putfield com.sun.security.sasl.CramMD5Server.fqdn:Ljava/lang/String;
7: aload 0
aload 4
putfield com.sun.security.sasl.CramMD5Server.cbh:Ljavax/security/auth/callback/CallbackHandler;
8: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lcom/sun/security/sasl/CramMD5Server;
0 9 1 protocol Ljava/lang/String;
0 9 2 serverFqdn Ljava/lang/String;
0 9 3 props Ljava/util/Map<Ljava/lang/String;*>;
0 9 4 cbh Ljavax/security/auth/callback/CallbackHandler;
Exceptions:
throws javax.security.sasl.SaslException
Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;*>;Ljavax/security/auth/callback/CallbackHandler;)V
MethodParameters:
Name Flags
protocol
serverFqdn
props
cbh
public byte[] evaluateResponse(byte[]);
descriptor: ([B)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=13, args_size=2
start local 0 start local 1 0: aload 0
getfield com.sun.security.sasl.CramMD5Server.completed:Z
ifeq 4
1: new java.lang.IllegalStateException
dup
2: ldc "CRAM-MD5 authentication already completed"
3: invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.security.sasl.CramMD5Server.aborted:Z
ifeq 8
5: new java.lang.IllegalStateException
dup
6: ldc "CRAM-MD5 authentication previously aborted due to error"
7: invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.security.sasl.CramMD5Server.challengeData:[B
ifnonnull 32
9: aload 1
arraylength
ifeq 14
10: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
11: new javax.security.sasl.SaslException
dup
12: ldc "CRAM-MD5 does not expect any initial response"
13: invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
new java.util.Random
dup
invokespecial java.util.Random.<init>:()V
astore 2
start local 2 15: aload 2
invokevirtual java.util.Random.nextLong:()J
lstore 3
start local 3 16: invokestatic java.lang.System.currentTimeMillis:()J
lstore 5
start local 5 17: new java.lang.StringBuffer
dup
invokespecial java.lang.StringBuffer.<init>:()V
astore 7
start local 7 18: aload 7
bipush 60
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
19: aload 7
lload 3
invokevirtual java.lang.StringBuffer.append:(J)Ljava/lang/StringBuffer;
pop
20: aload 7
bipush 46
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
21: aload 7
lload 5
invokevirtual java.lang.StringBuffer.append:(J)Ljava/lang/StringBuffer;
pop
22: aload 7
bipush 64
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
23: aload 7
aload 0
getfield com.sun.security.sasl.CramMD5Server.fqdn:Ljava/lang/String;
invokevirtual java.lang.StringBuffer.append:(Ljava/lang/String;)Ljava/lang/StringBuffer;
pop
24: aload 7
bipush 62
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
25: aload 7
invokevirtual java.lang.StringBuffer.toString:()Ljava/lang/String;
astore 8
start local 8 26: getstatic com.sun.security.sasl.CramMD5Server.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
27: ldc "CRAMSRV01:Generated challenge: {0}"
aload 8
28: invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V
29: aload 0
aload 8
ldc "UTF8"
invokevirtual java.lang.String.getBytes:(Ljava/lang/String;)[B
putfield com.sun.security.sasl.CramMD5Server.challengeData:[B
30: aload 0
getfield com.sun.security.sasl.CramMD5Server.challengeData:[B
invokevirtual byte[].clone:()Ljava/lang/Object;
checkcast byte[]
31: areturn
end local 8 end local 7 end local 5 end local 3 end local 2 32: StackMap locals:
StackMap stack:
getstatic com.sun.security.sasl.CramMD5Server.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 37
33: getstatic com.sun.security.sasl.CramMD5Server.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
34: ldc "CRAMSRV02:Received response: {0}"
35: new java.lang.String
dup
aload 1
ldc "UTF8"
invokespecial java.lang.String.<init>:([BLjava/lang/String;)V
36: invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V
37: StackMap locals:
StackMap stack:
iconst_0
istore 2
start local 2 38: iconst_0
istore 3
start local 3 39: goto 44
40: StackMap locals: int int
StackMap stack:
aload 1
iload 3
baload
bipush 32
if_icmpne 43
41: iload 3
istore 2
42: goto 45
43: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
44: iload 3
aload 1
arraylength
if_icmplt 40
end local 3 45: StackMap locals:
StackMap stack:
iload 2
ifne 50
46: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
47: new javax.security.sasl.SaslException
dup
48: ldc "CRAM-MD5: Invalid response; space missing"
49: invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;)V
athrow
50: StackMap locals:
StackMap stack:
new java.lang.String
dup
aload 1
iconst_0
iload 2
ldc "UTF8"
invokespecial java.lang.String.<init>:([BIILjava/lang/String;)V
astore 3
start local 3 51: getstatic com.sun.security.sasl.CramMD5Server.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
52: ldc "CRAMSRV03:Extracted username: {0}"
aload 3
53: invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V
54: new javax.security.auth.callback.NameCallback
dup
ldc "CRAM-MD5 authentication ID: "
aload 3
invokespecial javax.security.auth.callback.NameCallback.<init>:(Ljava/lang/String;Ljava/lang/String;)V
55: astore 4
start local 4 56: new javax.security.auth.callback.PasswordCallback
dup
ldc "CRAM-MD5 password: "
iconst_0
invokespecial javax.security.auth.callback.PasswordCallback.<init>:(Ljava/lang/String;Z)V
57: astore 5
start local 5 58: aload 0
getfield com.sun.security.sasl.CramMD5Server.cbh:Ljavax/security/auth/callback/CallbackHandler;
iconst_2
anewarray javax.security.auth.callback.Callback
dup
iconst_0
aload 4
aastore
dup
iconst_1
aload 5
aastore
invokeinterface javax.security.auth.callback.CallbackHandler.handle:([Ljavax/security/auth/callback/Callback;)V
59: aload 5
invokevirtual javax.security.auth.callback.PasswordCallback.getPassword:()[C
astore 6
start local 6 60: aload 6
ifnull 61
aload 6
arraylength
ifne 65
61: StackMap locals: com.sun.security.sasl.CramMD5Server byte[] int java.lang.String javax.security.auth.callback.NameCallback javax.security.auth.callback.PasswordCallback char[]
StackMap stack:
aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
62: new javax.security.sasl.SaslException
dup
63: new java.lang.StringBuilder
dup
ldc "CRAM-MD5: username not found: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
64: invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;)V
athrow
65: StackMap locals:
StackMap stack:
aload 5
invokevirtual javax.security.auth.callback.PasswordCallback.clearPassword:()V
66: new java.lang.String
dup
aload 6
invokespecial java.lang.String.<init>:([C)V
astore 7
start local 7 67: iconst_0
istore 8
start local 8 68: goto 71
69: StackMap locals: java.lang.String int
StackMap stack:
aload 6
iload 8
iconst_0
castore
70: iinc 8 1
StackMap locals:
StackMap stack:
71: iload 8
aload 6
arraylength
if_icmplt 69
end local 8 72: aload 0
aload 7
ldc "UTF8"
invokevirtual java.lang.String.getBytes:(Ljava/lang/String;)[B
putfield com.sun.security.sasl.CramMD5Server.pw:[B
73: aload 0
getfield com.sun.security.sasl.CramMD5Server.pw:[B
aload 0
getfield com.sun.security.sasl.CramMD5Server.challengeData:[B
invokestatic com.sun.security.sasl.CramMD5Server.HMAC_MD5:([B[B)Ljava/lang/String;
astore 8
start local 8 74: getstatic com.sun.security.sasl.CramMD5Server.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
75: ldc "CRAMSRV04:Expecting digest: {0}"
aload 8
76: invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V
77: aload 0
invokevirtual com.sun.security.sasl.CramMD5Server.clearPassword:()V
78: aload 8
ldc "UTF8"
invokevirtual java.lang.String.getBytes:(Ljava/lang/String;)[B
astore 9
start local 9 79: aload 1
arraylength
iload 2
isub
iconst_1
isub
istore 10
start local 10 80: aload 9
arraylength
iload 10
if_icmpeq 83
81: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
82: new javax.security.sasl.SaslException
dup
ldc "Invalid response"
invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;)V
athrow
83: StackMap locals: com.sun.security.sasl.CramMD5Server byte[] int java.lang.String javax.security.auth.callback.NameCallback javax.security.auth.callback.PasswordCallback char[] java.lang.String java.lang.String byte[] int
StackMap stack:
iconst_0
istore 11
start local 11 84: iload 2
iconst_1
iadd
istore 12
start local 12 85: goto 90
86: StackMap locals: int int
StackMap stack:
aload 9
iload 11
iinc 11 1
baload
aload 1
iload 12
baload
if_icmpeq 89
87: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
88: new javax.security.sasl.SaslException
dup
ldc "Invalid response"
invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;)V
athrow
89: StackMap locals:
StackMap stack:
iinc 12 1
StackMap locals:
StackMap stack:
90: iload 12
aload 1
arraylength
if_icmplt 86
end local 12 91: new javax.security.sasl.AuthorizeCallback
dup
aload 3
aload 3
invokespecial javax.security.sasl.AuthorizeCallback.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 12
start local 12 92: aload 0
getfield com.sun.security.sasl.CramMD5Server.cbh:Ljavax/security/auth/callback/CallbackHandler;
iconst_1
anewarray javax.security.auth.callback.Callback
dup
iconst_0
aload 12
aastore
invokeinterface javax.security.auth.callback.CallbackHandler.handle:([Ljavax/security/auth/callback/Callback;)V
93: aload 12
invokevirtual javax.security.sasl.AuthorizeCallback.isAuthorized:()Z
ifeq 96
94: aload 0
aload 12
invokevirtual javax.security.sasl.AuthorizeCallback.getAuthorizedID:()Ljava/lang/String;
putfield com.sun.security.sasl.CramMD5Server.authzid:Ljava/lang/String;
95: goto 100
96: StackMap locals: com.sun.security.sasl.CramMD5Server byte[] int java.lang.String javax.security.auth.callback.NameCallback javax.security.auth.callback.PasswordCallback char[] java.lang.String java.lang.String byte[] int int javax.security.sasl.AuthorizeCallback
StackMap stack:
aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
97: new javax.security.sasl.SaslException
dup
98: new java.lang.StringBuilder
dup
ldc "CRAM-MD5: user not authorized: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
99: invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;)V
athrow
100: StackMap locals:
StackMap stack:
getstatic com.sun.security.sasl.CramMD5Server.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
101: ldc "CRAMSRV05:Authorization id: {0}"
aload 0
getfield com.sun.security.sasl.CramMD5Server.authzid:Ljava/lang/String;
102: invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V
103: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.completed:Z
104: aconst_null
areturn
end local 12 end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 105: StackMap locals: com.sun.security.sasl.CramMD5Server byte[]
StackMap stack: java.io.UnsupportedEncodingException
astore 2
start local 2 106: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
107: new javax.security.sasl.SaslException
dup
ldc "UTF8 not available on platform"
aload 2
invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 108: StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
astore 2
start local 2 109: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
110: new javax.security.sasl.SaslException
dup
ldc "MD5 algorithm not available on platform"
aload 2
invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 111: StackMap locals:
StackMap stack: javax.security.auth.callback.UnsupportedCallbackException
astore 2
start local 2 112: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
113: new javax.security.sasl.SaslException
dup
ldc "CRAM-MD5 authentication failed"
aload 2
invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 114: StackMap locals:
StackMap stack: javax.security.sasl.SaslException
astore 2
start local 2 115: aload 2
athrow
end local 2 116: StackMap locals:
StackMap stack: java.io.IOException
astore 2
start local 2 117: aload 0
iconst_1
putfield com.sun.security.sasl.CramMD5Server.aborted:Z
118: new javax.security.sasl.SaslException
dup
ldc "CRAM-MD5 authentication failed"
aload 2
invokespecial javax.security.sasl.SaslException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 119 0 this Lcom/sun/security/sasl/CramMD5Server;
0 119 1 responseData [B
15 32 2 random Ljava/util/Random;
16 32 3 rand J
17 32 5 timestamp J
18 32 7 buf Ljava/lang/StringBuffer;
26 32 8 challengeStr Ljava/lang/String;
38 105 2 ulen I
39 45 3 i I
51 105 3 username Ljava/lang/String;
56 105 4 ncb Ljavax/security/auth/callback/NameCallback;
58 105 5 pcb Ljavax/security/auth/callback/PasswordCallback;
60 105 6 pwChars [C
67 105 7 pwStr Ljava/lang/String;
68 72 8 i I
74 105 8 digest Ljava/lang/String;
79 105 9 expectedDigest [B
80 105 10 digestLen I
84 105 11 j I
85 91 12 i I
92 105 12 acb Ljavax/security/sasl/AuthorizeCallback;
106 108 2 e Ljava/io/UnsupportedEncodingException;
109 111 2 e Ljava/security/NoSuchAlgorithmException;
112 114 2 e Ljavax/security/auth/callback/UnsupportedCallbackException;
115 116 2 e Ljavax/security/sasl/SaslException;
117 119 2 e Ljava/io/IOException;
Exception table:
from to target type
8 31 105 Class java.io.UnsupportedEncodingException
32 104 105 Class java.io.UnsupportedEncodingException
8 31 108 Class java.security.NoSuchAlgorithmException
32 104 108 Class java.security.NoSuchAlgorithmException
8 31 111 Class javax.security.auth.callback.UnsupportedCallbackException
32 104 111 Class javax.security.auth.callback.UnsupportedCallbackException
8 31 114 Class javax.security.sasl.SaslException
32 104 114 Class javax.security.sasl.SaslException
8 31 116 Class java.io.IOException
32 104 116 Class java.io.IOException
Exceptions:
throws javax.security.sasl.SaslException
MethodParameters:
Name Flags
responseData
public java.lang.String getAuthorizationID();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.security.sasl.CramMD5Server.completed:Z
ifeq 2
1: aload 0
getfield com.sun.security.sasl.CramMD5Server.authzid:Ljava/lang/String;
areturn
2: StackMap locals:
StackMap stack:
new java.lang.IllegalStateException
dup
3: ldc "CRAM-MD5 authentication not completed"
4: invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/sun/security/sasl/CramMD5Server;
}
SourceFile: "CramMD5Server.java"