public final class com.sun.jmx.remote.security.HashedPasswordManager
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.sun.jmx.remote.security.HashedPasswordManager
super_class: java.lang.Object
{
private static final java.lang.String DefaultHashAlgorithm;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "SHA3-512"
private static final int DefaultSaltLength;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 64
private final java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Map<java.lang.String, com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials> userCredentialsMap;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/String;Lcom/sun/jmx/remote/security/HashedPasswordManager$UserCredentials;>;
private final java.lang.String passwordFile;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean shouldHashPasswords;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private boolean isLogged;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private static final com.sun.jmx.remote.util.ClassLogger logger;
descriptor: Lcom/sun/jmx/remote/util/ClassLogger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: new com.sun.jmx.remote.util.ClassLogger
dup
ldc "javax.management.remote.misc"
1: ldc "HashedPasswordManager"
2: invokespecial com.sun.jmx.remote.util.ClassLogger.<init>:(Ljava/lang/String;Ljava/lang/String;)V
3: putstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
4: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.String, boolean);
descriptor: (Ljava/lang/String;Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.security.SecureRandom
dup
invokespecial java.security.SecureRandom.<init>:()V
putfield com.sun.jmx.remote.security.HashedPasswordManager.random:Ljava/security/SecureRandom;
2: aload 0
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
3: aload 0
iconst_0
putfield com.sun.jmx.remote.security.HashedPasswordManager.isLogged:Z
4: aload 0
aload 1
putfield com.sun.jmx.remote.security.HashedPasswordManager.passwordFile:Ljava/lang/String;
5: aload 0
iload 2
putfield com.sun.jmx.remote.security.HashedPasswordManager.shouldHashPasswords:Z
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/sun/jmx/remote/security/HashedPasswordManager;
0 7 1 filename Ljava/lang/String;
0 7 2 shouldHashPasswords Z
MethodParameters:
Name Flags
filename
shouldHashPasswords
private java.lang.String[] getHash(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=8, args_size=3
start local 0 start local 1 start local 2 0: bipush 64
newarray 8
astore 3
start local 3 1: aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.random:Ljava/security/SecureRandom;
aload 3
invokevirtual java.security.SecureRandom.nextBytes:([B)V
2: aload 1
invokestatic java.security.MessageDigest.getInstance:(Ljava/lang/String;)Ljava/security/MessageDigest;
astore 4
start local 4 3: aload 4
invokevirtual java.security.MessageDigest.reset:()V
4: aload 4
aload 3
invokevirtual java.security.MessageDigest.update:([B)V
5: aload 4
aload 2
getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual java.security.MessageDigest.digest:([B)[B
astore 5
start local 5 6: invokestatic java.util.Base64.getEncoder:()Ljava/util/Base64$Encoder;
aload 3
invokevirtual java.util.Base64$Encoder.encodeToString:([B)Ljava/lang/String;
astore 6
start local 6 7: invokestatic java.util.Base64.getEncoder:()Ljava/util/Base64$Encoder;
aload 5
invokevirtual java.util.Base64$Encoder.encodeToString:([B)Ljava/lang/String;
astore 7
start local 7 8: iconst_2
anewarray java.lang.String
dup
iconst_0
aload 6
aastore
dup
iconst_1
aload 7
aastore
9: areturn
end local 7 end local 6 end local 5 end local 4 end local 3 10: StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
pop
11: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 13
12: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "getHash"
new java.lang.StringBuilder
dup
ldc "Invalid algorithm : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
13: StackMap locals:
StackMap stack:
iconst_2
anewarray java.lang.String
dup
iconst_0
ldc ""
aastore
dup
iconst_1
ldc ""
aastore
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lcom/sun/jmx/remote/security/HashedPasswordManager;
0 14 1 algorithm Ljava/lang/String;
0 14 2 password Ljava/lang/String;
1 10 3 salt [B
3 10 4 digest Ljava/security/MessageDigest;
6 10 5 hash [B
7 10 6 saltStr Ljava/lang/String;
8 10 7 hashStr Ljava/lang/String;
Exception table:
from to target type
0 9 10 Class java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
algorithm
password
private java.lang.String[] readPasswordFile();
descriptor: ()[Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=9, args_size=1
start local 0 0: ldc Lcom/sun/jmx/remote/security/HashedPasswordManager;
dup
astore 1
monitorenter
1: new java.io.File
dup
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.passwordFile:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 3
start local 3 2: aconst_null
astore 4
aconst_null
astore 5
3: new java.io.FileInputStream
dup
aload 3
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
astore 6
start local 6 4: aload 6
invokevirtual java.io.FileInputStream.getChannel:()Ljava/nio/channels/FileChannel;
lconst_0
ldc 9223372036854775807
iconst_1
invokevirtual java.nio.channels.FileChannel.lock:(JJZ)Ljava/nio/channels/FileLock;
astore 7
start local 7 5: aload 3
invokevirtual java.io.File.length:()J
l2i
newarray 8
astore 2
start local 2 6: aload 6
aload 2
invokevirtual java.io.FileInputStream.read:([B)I
istore 8
start local 8 7: iload 8
aload 2
arraylength
if_icmpeq 9
8: new java.io.IOException
dup
ldc "Failed to read data from the password file"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.Class byte[] java.io.File java.lang.Throwable java.lang.Throwable java.io.FileInputStream java.nio.channels.FileLock int
StackMap stack:
aload 7
invokevirtual java.nio.channels.FileLock.release:()V
end local 8 10: aload 7
ifnull 13
aload 7
invokevirtual java.nio.channels.FileLock.close:()V
goto 13
end local 2 StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.Class top java.io.File java.lang.Throwable java.lang.Throwable java.io.FileInputStream java.nio.channels.FileLock
StackMap stack: java.lang.Throwable
11: astore 4
aload 7
ifnull 12
aload 7
invokevirtual java.nio.channels.FileLock.close:()V
end local 7 StackMap locals:
StackMap stack:
12: aload 4
athrow
start local 2 StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.Class byte[] java.io.File java.lang.Throwable java.lang.Throwable java.io.FileInputStream
StackMap stack:
13: aload 6
ifnull 21
aload 6
invokevirtual java.io.FileInputStream.close:()V
goto 21
end local 2 StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.Class top java.io.File java.lang.Throwable java.lang.Throwable java.io.FileInputStream
StackMap stack: java.lang.Throwable
14: astore 5
aload 4
ifnonnull 15
aload 5
astore 4
goto 16
StackMap locals:
StackMap stack:
15: aload 4
aload 5
if_acmpeq 16
aload 4
aload 5
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
16: aload 6
ifnull 17
aload 6
invokevirtual java.io.FileInputStream.close:()V
end local 6 StackMap locals:
StackMap stack:
17: aload 4
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
18: astore 5
aload 4
ifnonnull 19
aload 5
astore 4
goto 20
StackMap locals:
StackMap stack:
19: aload 4
aload 5
if_acmpeq 20
aload 4
aload 5
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
20: aload 4
athrow
start local 2 21: StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.Class byte[] java.io.File
StackMap stack:
new java.lang.String
dup
aload 2
getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
invokespecial java.lang.String.<init>:([BLjava/nio/charset/Charset;)V
astore 4
start local 4 22: aload 4
ldc "\\r?\\n"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
aload 1
monitorexit
23: areturn
end local 4 end local 3 end local 2 24: StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.Class
StackMap stack: java.lang.Throwable
aload 1
monitorexit
25: athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lcom/sun/jmx/remote/security/HashedPasswordManager;
6 11 2 data [B
13 14 2 data [B
21 24 2 data [B
2 24 3 f Ljava/io/File;
4 17 6 fin Ljava/io/FileInputStream;
5 12 7 lock Ljava/nio/channels/FileLock;
7 10 8 read I
22 24 4 str Ljava/lang/String;
Exception table:
from to target type
5 10 11 any
4 13 14 any
3 18 18 any
1 23 24 any
24 25 24 any
Exceptions:
throws java.io.IOException
private void writePasswordFile(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=8, args_size=2
start local 0 start local 1 0: ldc Lcom/sun/jmx/remote/security/HashedPasswordManager;
dup
astore 2
monitorenter
1: aconst_null
astore 3
aconst_null
astore 4
2: new java.io.FileOutputStream
dup
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.passwordFile:Ljava/lang/String;
invokespecial java.io.FileOutputStream.<init>:(Ljava/lang/String;)V
astore 5
start local 5 3: new java.io.OutputStreamWriter
dup
aload 5
getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
invokespecial java.io.OutputStreamWriter.<init>:(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
astore 6
start local 6 4: aload 5
invokevirtual java.io.FileOutputStream.getChannel:()Ljava/nio/channels/FileChannel;
invokevirtual java.nio.channels.FileChannel.lock:()Ljava/nio/channels/FileLock;
astore 7
start local 7 5: aload 6
aload 1
invokevirtual java.io.OutputStreamWriter.write:(Ljava/lang/String;)V
6: aload 7
invokevirtual java.nio.channels.FileLock.release:()V
7: aload 7
ifnull 10
aload 7
invokevirtual java.nio.channels.FileLock.close:()V
goto 10
StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.String java.lang.Class java.lang.Throwable java.lang.Throwable java.io.FileOutputStream java.io.OutputStreamWriter java.nio.channels.FileLock
StackMap stack: java.lang.Throwable
8: astore 3
aload 7
ifnull 9
aload 7
invokevirtual java.nio.channels.FileLock.close:()V
end local 7 StackMap locals:
StackMap stack:
9: aload 3
athrow
StackMap locals:
StackMap stack:
10: aload 6
ifnull 15
aload 6
invokevirtual java.io.OutputStreamWriter.close:()V
goto 15
StackMap locals:
StackMap stack: java.lang.Throwable
11: astore 4
aload 3
ifnonnull 12
aload 4
astore 3
goto 13
StackMap locals:
StackMap stack:
12: aload 3
aload 4
if_acmpeq 13
aload 3
aload 4
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
13: aload 6
ifnull 14
aload 6
invokevirtual java.io.OutputStreamWriter.close:()V
end local 6 StackMap locals:
StackMap stack:
14: aload 3
athrow
StackMap locals:
StackMap stack:
15: aload 5
ifnull 23
aload 5
invokevirtual java.io.FileOutputStream.close:()V
goto 23
StackMap locals:
StackMap stack: java.lang.Throwable
16: astore 4
aload 3
ifnonnull 17
aload 4
astore 3
goto 18
StackMap locals:
StackMap stack:
17: aload 3
aload 4
if_acmpeq 18
aload 3
aload 4
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
18: aload 5
ifnull 19
aload 5
invokevirtual java.io.FileOutputStream.close:()V
end local 5 StackMap locals:
StackMap stack:
19: aload 3
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
20: astore 4
aload 3
ifnonnull 21
aload 4
astore 3
goto 22
StackMap locals:
StackMap stack:
21: aload 3
aload 4
if_acmpeq 22
aload 3
aload 4
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
22: aload 3
athrow
23: StackMap locals:
StackMap stack:
aload 2
monitorexit
24: goto 27
StackMap locals:
StackMap stack: java.lang.Throwable
25: aload 2
monitorexit
26: athrow
27: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Lcom/sun/jmx/remote/security/HashedPasswordManager;
0 28 1 input Ljava/lang/String;
3 19 5 fout Ljava/io/FileOutputStream;
4 14 6 out Ljava/io/OutputStreamWriter;
5 9 7 lock Ljava/nio/channels/FileLock;
Exception table:
from to target type
5 7 8 any
4 10 11 any
3 15 16 any
2 20 20 any
1 24 25 any
25 26 25 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
input
public synchronized boolean authenticate(java.lang.String, char[]);
descriptor: (Ljava/lang/String;[C)Z
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=5, locals=10, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.containsKey:(Ljava/lang/Object;)Z
ifeq 20
1: aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials
astore 3
start local 3 2: invokestatic java.util.Base64.getDecoder:()Ljava/util/Base64$Decoder;
aload 3
getfield com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.b64Salt:Ljava/lang/String;
invokevirtual java.util.Base64$Decoder.decode:(Ljava/lang/String;)[B
astore 4
start local 4 3: invokestatic java.util.Base64.getDecoder:()Ljava/util/Base64$Decoder;
aload 3
getfield com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.b64Hash:Ljava/lang/String;
invokevirtual java.util.Base64$Decoder.decode:(Ljava/lang/String;)[B
astore 5
start local 5 4: aload 3
getfield com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.hashAlgorithm:Ljava/lang/String;
invokestatic java.security.MessageDigest.getInstance:(Ljava/lang/String;)Ljava/security/MessageDigest;
astore 6
start local 6 5: aload 6
invokevirtual java.security.MessageDigest.reset:()V
6: aload 6
aload 4
invokevirtual java.security.MessageDigest.update:([B)V
7: ldc "UTF-8"
invokestatic java.nio.charset.Charset.forName:(Ljava/lang/String;)Ljava/nio/charset/Charset;
aload 2
invokestatic java.nio.CharBuffer.wrap:([C)Ljava/nio/CharBuffer;
invokevirtual java.nio.charset.Charset.encode:(Ljava/nio/CharBuffer;)Ljava/nio/ByteBuffer;
astore 7
start local 7 8: aload 7
invokevirtual java.nio.ByteBuffer.limit:()I
newarray 8
astore 8
start local 8 9: aload 7
aload 8
invokevirtual java.nio.ByteBuffer.get:([B)Ljava/nio/ByteBuffer;
pop
10: aload 6
aload 8
invokevirtual java.security.MessageDigest.digest:([B)[B
astore 9
start local 9 11: aload 9
aload 5
invokestatic java.util.Arrays.equals:([B[B)Z
12: ireturn
end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 13: StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
pop
14: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 19
15: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "authenticate"
new java.lang.StringBuilder
dup
ldc "Unrecognized hash algorithm : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
16: aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials
getfield com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.hashAlgorithm:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
17: ldc " - for user : "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
18: invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
19: StackMap locals:
StackMap stack:
iconst_0
ireturn
20: StackMap locals:
StackMap stack:
getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 22
21: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "authenticate"
new java.lang.StringBuilder
dup
ldc "Unknown user : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
22: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Lcom/sun/jmx/remote/security/HashedPasswordManager;
0 23 1 userName Ljava/lang/String;
0 23 2 inputPassword [C
2 13 3 us Lcom/sun/jmx/remote/security/HashedPasswordManager$UserCredentials;
3 13 4 salt [B
4 13 5 targetHash [B
5 13 6 digest Ljava/security/MessageDigest;
8 13 7 byteBuffer Ljava/nio/ByteBuffer;
9 13 8 passwordBytes [B
11 13 9 hash [B
Exception table:
from to target type
1 12 13 Class java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
userName
inputPassword
public synchronized void loadPasswords();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=5, locals=4, args_size=1
start local 0 0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
astore 1
start local 1 1: aload 1
ifnull 3
2: aload 1
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.passwordFile:Ljava/lang/String;
invokevirtual java.lang.SecurityManager.checkRead:(Ljava/lang/String;)V
3: StackMap locals: java.lang.SecurityManager
StackMap stack:
new java.util.concurrent.atomic.AtomicBoolean
dup
iconst_0
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:(Z)V
astore 2
start local 2 4: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 3
start local 3 5: aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
invokeinterface java.util.Map.clear:()V
6: aload 0
invokevirtual com.sun.jmx.remote.security.HashedPasswordManager.readPasswordFile:()[Ljava/lang/String;
invokestatic java.util.Arrays.stream:([Ljava/lang/Object;)Ljava/util/stream/Stream;
aload 0
aload 3
aload 2
invokedynamic accept(Lcom/sun/jmx/remote/security/HashedPasswordManager;Ljava/lang/StringBuilder;Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/util/function/Consumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
com/sun/jmx/remote/security/HashedPasswordManager.lambda$0(Ljava/lang/StringBuilder;Ljava/util/concurrent/atomic/AtomicBoolean;Ljava/lang/String;)V (7)
(Ljava/lang/String;)V
invokeinterface java.util.stream.Stream.forEach:(Ljava/util/function/Consumer;)V
7: aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.shouldHashPasswords:Z
ifne 14
aload 2
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifeq 14
8: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 14
9: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "loadPasswords"
10: new java.lang.StringBuilder
dup
ldc "Passwords in "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.passwordFile:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " are in clear but are requested "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
11: ldc "not to be hashed !!!"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
12: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
13: invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
14: StackMap locals: java.util.concurrent.atomic.AtomicBoolean java.lang.StringBuilder
StackMap stack:
aload 3
ldc "# The passwords in this file are hashed"
invokevirtual java.lang.StringBuilder.indexOf:(Ljava/lang/String;)I
ifeq 16
15: aload 3
iconst_0
ldc "# The passwords in this file are hashed.\n# In order to change the password for a role, replace the hashed password entry\n# with a clear text password or a new hashed password. If the new password is in clear,\n# it will be replaced with its hash when a new login attempt is made.\n\n"
invokevirtual java.lang.StringBuilder.insert:(ILjava/lang/String;)Ljava/lang/StringBuilder;
pop
16: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.shouldHashPasswords:Z
ifeq 31
aload 2
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifeq 31
17: new java.io.File
dup
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.passwordFile:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.canWrite:()Z
ifeq 24
18: aload 0
aload 3
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.sun.jmx.remote.security.HashedPasswordManager.writePasswordFile:(Ljava/lang/String;)V
19: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 31
20: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "loadPasswords"
21: new java.lang.StringBuilder
dup
ldc "Wrote hashed passwords to file : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.passwordFile:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
22: invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
23: goto 31
StackMap locals:
StackMap stack:
24: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 31
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.isLogged:Z
ifne 31
25: aload 0
iconst_1
putfield com.sun.jmx.remote.security.HashedPasswordManager.isLogged:Z
26: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "loadPasswords"
27: new java.lang.StringBuilder
dup
ldc "Passwords in "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.passwordFile:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " are in clear and password file is read-only. "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
28: ldc "Passwords cannot be hashed !!!!"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
29: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
30: invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
31: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Lcom/sun/jmx/remote/security/HashedPasswordManager;
1 32 1 security Ljava/lang/SecurityManager;
4 32 2 hasClearPasswords Ljava/util/concurrent/atomic/AtomicBoolean;
5 32 3 sbuf Ljava/lang/StringBuilder;
Exceptions:
throws java.io.IOException, java.lang.SecurityException
private void lambda$0(java.lang.StringBuilder, java.util.concurrent.atomic.AtomicBoolean, java.lang.String);
descriptor: (Ljava/lang/StringBuilder;Ljava/util/concurrent/atomic/AtomicBoolean;Ljava/lang/String;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=7, locals=7, args_size=4
start local 0 start local 3 0: aload 3
invokevirtual java.lang.String.trim:()Ljava/lang/String;
ldc "#"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 3
1: aload 1
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
2: return
3: StackMap locals:
StackMap stack:
aload 3
ldc "\\s+"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
astore 4
start local 4 4: aload 4
arraylength
tableswitch { // 2 - 4
2: 5
3: 20
4: 20
default: 30
}
5: StackMap locals: java.lang.String[]
StackMap stack:
aload 0
ldc "SHA3-512"
aload 4
iconst_1
aaload
invokevirtual com.sun.jmx.remote.security.HashedPasswordManager.getHash:(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
astore 5
start local 5 6: new com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials
dup
aload 4
iconst_0
aaload
ldc "SHA3-512"
aload 5
iconst_0
aaload
aload 5
iconst_1
aaload
invokespecial com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
astore 6
start local 6 7: aload 1
aload 6
getfield com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.userName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 6
getfield com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.b64Salt:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
8: ldc " "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 6
getfield com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.b64Hash:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
9: aload 6
getfield com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.hashAlgorithm:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
10: aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
aload 4
iconst_0
aaload
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
ifnull 13
11: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 13
12: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "loadPasswords"
new java.lang.StringBuilder
dup
ldc "Ignoring entry for role : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
iconst_0
aaload
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
13: StackMap locals: java.lang.String[] com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials
StackMap stack:
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
aload 4
iconst_0
aaload
aload 6
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
14: aload 2
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
15: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 31
16: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "loadPasswords"
17: ldc "Found atleast one clear password"
18: invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
19: goto 31
end local 6 end local 5 20: StackMap locals:
StackMap stack:
new com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials
dup
aload 4
iconst_0
aaload
aload 4
arraylength
iconst_4
if_icmpne 21
aload 4
iconst_3
aaload
goto 22
StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.StringBuilder java.util.concurrent.atomic.AtomicBoolean java.lang.String java.lang.String[]
StackMap stack: new 20 new 20 java.lang.String
21: ldc "SHA3-512"
22: StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager java.lang.StringBuilder java.util.concurrent.atomic.AtomicBoolean java.lang.String java.lang.String[]
StackMap stack: new 20 new 20 java.lang.String java.lang.String
aload 4
iconst_1
aaload
aload 4
iconst_2
aaload
23: invokespecial com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
astore 5
start local 5 24: aload 1
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
25: aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
aload 4
iconst_0
aaload
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
ifnull 28
26: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debugOn:()Z
ifeq 28
27: getstatic com.sun.jmx.remote.security.HashedPasswordManager.logger:Lcom/sun/jmx/remote/util/ClassLogger;
ldc "loadPasswords"
new java.lang.StringBuilder
dup
ldc "Ignoring entry for role : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
iconst_0
aaload
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.sun.jmx.remote.util.ClassLogger.debug:(Ljava/lang/String;Ljava/lang/String;)V
28: StackMap locals: com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials
StackMap stack:
aload 0
getfield com.sun.jmx.remote.security.HashedPasswordManager.userCredentialsMap:Ljava/util/Map;
aload 4
iconst_0
aaload
aload 5
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
29: goto 31
end local 5 30: StackMap locals:
StackMap stack:
aload 1
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
end local 4 31: StackMap locals:
StackMap stack:
return
end local 3 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Lcom/sun/jmx/remote/security/HashedPasswordManager;
0 32 3 line Ljava/lang/String;
4 31 4 tokens [Ljava/lang/String;
6 20 5 b64str [Ljava/lang/String;
7 20 6 us Lcom/sun/jmx/remote/security/HashedPasswordManager$UserCredentials;
24 30 5 us Lcom/sun/jmx/remote/security/HashedPasswordManager$UserCredentials;
}
SourceFile: "HashedPasswordManager.java"
NestMembers:
com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials
InnerClasses:
private final UserCredentials = com.sun.jmx.remote.security.HashedPasswordManager$UserCredentials of com.sun.jmx.remote.security.HashedPasswordManager
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public Decoder = java.util.Base64$Decoder of java.util.Base64
public Encoder = java.util.Base64$Encoder of java.util.Base64