class com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon
super_class: java.lang.Object
{
static final java.lang.String rsaEncryptionAlgorithmWithOAEP;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "RSA_OAEP"
static byte[] version;
descriptor: [B
flags: (0x0008) ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: iconst_1
newarray 8
dup
iconst_0
iconst_1
bastore
putstatic com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon.version:[B
return
LocalVariableTable:
Start End Slot Name Signature
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/microsoft/sqlserver/jdbc/KeyStoreProviderCommon;
static void validateEncryptionAlgorithm(java.lang.String, boolean);
descriptor: (Ljava/lang/String;Z)V
flags: (0x0008) ACC_STATIC
Code:
stack=7, locals=5, args_size=2
start local 0 start local 1 0: iload 1
ifeq 1
ldc "R_NullKeyEncryptionAlgorithm"
goto 2
StackMap locals:
StackMap stack:
1: ldc "R_NullKeyEncryptionAlgorithmInternal"
StackMap locals:
StackMap stack: java.lang.String
2: astore 2
start local 2 3: aload 0
ifnonnull 5
4: new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aconst_null
aload 2
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
aconst_null
iconst_0
iconst_0
invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;IZ)V
athrow
5: StackMap locals: java.lang.String
StackMap stack:
iload 1
ifeq 6
ldc "R_InvalidKeyEncryptionAlgorithm"
goto 7
StackMap locals:
StackMap stack:
6: ldc "R_InvalidKeyEncryptionAlgorithmInternal"
StackMap locals:
StackMap stack: java.lang.String
7: astore 2
8: ldc "RSA_OAEP"
aload 0
invokevirtual java.lang.String.trim:()Ljava/lang/String;
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 12
9: new java.text.MessageFormat
dup
aload 2
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
invokespecial java.text.MessageFormat.<init>:(Ljava/lang/String;)V
astore 3
start local 3 10: iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
dup
iconst_1
ldc "RSA_OAEP"
aastore
astore 4
start local 4 11: new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aload 3
aload 4
invokevirtual java.text.MessageFormat.format:(Ljava/lang/Object;)Ljava/lang/String;
aconst_null
invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 end local 3 12: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 encryptionAlgorithm Ljava/lang/String;
0 13 1 isEncrypt Z
3 13 2 errString Ljava/lang/String;
10 12 3 form Ljava/text/MessageFormat;
11 12 4 msgArgs [Ljava/lang/Object;
Exceptions:
throws com.microsoft.sqlserver.jdbc.SQLServerException
MethodParameters:
Name Flags
encryptionAlgorithm
isEncrypt
static void validateNonEmptyMasterKeyPath(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0008) ACC_STATIC
Code:
stack=7, locals=1, args_size=1
start local 0 0: aload 0
ifnull 1
aload 0
invokevirtual java.lang.String.trim:()Ljava/lang/String;
invokevirtual java.lang.String.length:()I
ifne 4
1: StackMap locals:
StackMap stack:
new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aconst_null
ldc "R_InvalidMasterKeyDetails"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
aconst_null
iconst_0
2: iconst_0
3: invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;IZ)V
athrow
4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 masterKeyPath Ljava/lang/String;
Exceptions:
throws com.microsoft.sqlserver.jdbc.SQLServerException
MethodParameters:
Name Flags
masterKeyPath
static byte[] decryptColumnEncryptionKey(java.lang.String, java.lang.String, byte[], com.microsoft.sqlserver.jdbc.CertificateDetails);
descriptor: (Ljava/lang/String;Ljava/lang/String;[BLcom/microsoft/sqlserver/jdbc/CertificateDetails;)[B
flags: (0x0008) ACC_STATIC
Code:
stack=7, locals=13, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
ifnonnull 4
1: new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aconst_null
ldc "R_NullEncryptedColumnEncryptionKey"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
2: aconst_null
iconst_0
iconst_0
3: invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;IZ)V
athrow
4: StackMap locals:
StackMap stack:
aload 2
arraylength
ifne 8
5: new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aconst_null
ldc "R_EmptyEncryptedColumnEncryptionKey"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
6: aconst_null
iconst_0
iconst_0
7: invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;IZ)V
athrow
8: StackMap locals:
StackMap stack:
aload 1
iconst_0
invokestatic com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon.validateEncryptionAlgorithm:(Ljava/lang/String;Z)V
9: getstatic com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon.version:[B
arraylength
istore 4
start local 4 10: aload 2
iload 4
invokestatic com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon.convertTwoBytesToShort:([BI)S
istore 5
start local 5 11: iinc 4 2
12: aload 2
iload 4
invokestatic com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon.convertTwoBytesToShort:([BI)S
istore 6
start local 6 13: iinc 4 2
14: iload 4
iload 5
iadd
istore 4
15: aload 2
arraylength
iload 4
isub
iload 6
isub
istore 7
start local 7 16: iload 6
newarray 8
astore 8
start local 8 17: aload 2
iload 4
aload 8
iconst_0
iload 6
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
18: iload 4
iload 6
iadd
istore 4
19: iload 7
newarray 8
astore 9
start local 9 20: aload 2
iload 4
aload 9
iconst_0
iload 7
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
21: aload 2
arraylength
aload 9
arraylength
isub
newarray 8
astore 10
start local 10 22: aload 2
iconst_0
aload 10
iconst_0
23: aload 2
arraylength
aload 9
arraylength
isub
24: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
25: aload 10
aload 9
aload 3
getfield com.microsoft.sqlserver.jdbc.CertificateDetails.certificate:Ljava/security/cert/X509Certificate;
aload 0
invokestatic com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon.verifyRSASignature:([B[BLjava/security/cert/X509Certificate;Ljava/lang/String;)Z
ifne 29
26: new java.text.MessageFormat
dup
ldc "R_InvalidCertificateSignature"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
invokespecial java.text.MessageFormat.<init>:(Ljava/lang/String;)V
astore 11
start local 11 27: iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
astore 12
start local 12 28: new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aload 11
aload 12
invokevirtual java.text.MessageFormat.format:(Ljava/lang/Object;)Ljava/lang/String;
aconst_null
invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 12 end local 11 29: StackMap locals: java.lang.String java.lang.String byte[] com.microsoft.sqlserver.jdbc.CertificateDetails int int int int byte[] byte[] byte[]
StackMap stack:
aload 8
aload 3
invokestatic com.microsoft.sqlserver.jdbc.KeyStoreProviderCommon.decryptRSAOAEP:([BLcom/microsoft/sqlserver/jdbc/CertificateDetails;)[B
astore 11
start local 11 30: aload 11
areturn
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 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 masterKeyPath Ljava/lang/String;
0 31 1 encryptionAlgorithm Ljava/lang/String;
0 31 2 encryptedColumnEncryptionKey [B
0 31 3 certificateDetails Lcom/microsoft/sqlserver/jdbc/CertificateDetails;
10 31 4 currentIndex I
11 31 5 keyPathLength I
13 31 6 cipherTextLength I
16 31 7 signatureLength I
17 31 8 cipherText [B
20 31 9 signature [B
22 31 10 hash [B
27 29 11 form Ljava/text/MessageFormat;
28 29 12 msgArgs [Ljava/lang/Object;
30 31 11 plainCEK [B
Exceptions:
throws com.microsoft.sqlserver.jdbc.SQLServerException
MethodParameters:
Name Flags
masterKeyPath
encryptionAlgorithm
encryptedColumnEncryptionKey
certificateDetails
private static byte[] decryptRSAOAEP(byte[], com.microsoft.sqlserver.jdbc.CertificateDetails);
descriptor: ([BLcom/microsoft/sqlserver/jdbc/CertificateDetails;)[B
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: ldc "RSA/ECB/OAEPWithSHA-1AndMGF1Padding"
invokestatic javax.crypto.Cipher.getInstance:(Ljava/lang/String;)Ljavax/crypto/Cipher;
astore 3
start local 3 2: aload 3
iconst_2
aload 1
getfield com.microsoft.sqlserver.jdbc.CertificateDetails.privateKey:Ljava/security/Key;
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;)V
3: aload 3
aload 0
invokevirtual javax.crypto.Cipher.update:([B)[B
pop
4: aload 3
invokevirtual javax.crypto.Cipher.doFinal:()[B
astore 2
end local 3 5: goto 10
6: StackMap locals: byte[] com.microsoft.sqlserver.jdbc.CertificateDetails byte[]
StackMap stack: java.security.GeneralSecurityException
astore 3
start local 3 7: new java.text.MessageFormat
dup
ldc "R_CEKDecryptionFailed"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
invokespecial java.text.MessageFormat.<init>:(Ljava/lang/String;)V
astore 4
start local 4 8: iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 3
invokevirtual java.security.GeneralSecurityException.getMessage:()Ljava/lang/String;
aastore
astore 5
start local 5 9: new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aload 4
aload 5
invokevirtual java.text.MessageFormat.format:(Ljava/lang/Object;)Ljava/lang/String;
aload 3
invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 5 end local 4 end local 3 10: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 cipherText [B
0 11 1 certificateDetails Lcom/microsoft/sqlserver/jdbc/CertificateDetails;
1 11 2 plainCEK [B
2 5 3 rsa Ljavax/crypto/Cipher;
7 10 3 e Ljava/security/GeneralSecurityException;
8 10 4 form Ljava/text/MessageFormat;
9 10 5 msgArgs [Ljava/lang/Object;
Exception table:
from to target type
1 5 6 Class java.security.InvalidKeyException
1 5 6 Class java.security.NoSuchAlgorithmException
1 5 6 Class javax.crypto.NoSuchPaddingException
1 5 6 Class javax.crypto.IllegalBlockSizeException
1 5 6 Class javax.crypto.BadPaddingException
Exceptions:
throws com.microsoft.sqlserver.jdbc.SQLServerException
MethodParameters:
Name Flags
cipherText
certificateDetails
static boolean verifyRSASignature(byte[], byte[], java.security.cert.X509Certificate, java.lang.String);
descriptor: ([B[BLjava/security/cert/X509Certificate;Ljava/lang/String;)Z
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=9, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iconst_0
istore 5
start local 5 1: ldc "SHA256withRSA"
invokestatic java.security.Signature.getInstance:(Ljava/lang/String;)Ljava/security/Signature;
astore 4
start local 4 2: aload 4
aload 2
invokevirtual java.security.cert.X509Certificate.getPublicKey:()Ljava/security/PublicKey;
invokevirtual java.security.Signature.initVerify:(Ljava/security/PublicKey;)V
3: aload 4
aload 0
invokevirtual java.security.Signature.update:([B)V
4: aload 4
aload 1
invokevirtual java.security.Signature.verify:([B)Z
istore 5
5: goto 10
end local 4 StackMap locals: byte[] byte[] java.security.cert.X509Certificate java.lang.String top int
StackMap stack: java.security.GeneralSecurityException
6: astore 6
start local 6 7: new java.text.MessageFormat
dup
ldc "R_InvalidCertificateSignature"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
invokespecial java.text.MessageFormat.<init>:(Ljava/lang/String;)V
astore 7
start local 7 8: iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 3
aastore
astore 8
start local 8 9: new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aload 7
aload 8
invokevirtual java.text.MessageFormat.format:(Ljava/lang/Object;)Ljava/lang/String;
aload 6
invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 8 end local 7 end local 6 start local 4 10: StackMap locals: byte[] byte[] java.security.cert.X509Certificate java.lang.String java.security.Signature int
StackMap stack:
iload 5
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 11 0 hash [B
0 11 1 signature [B
0 11 2 certificate Ljava/security/cert/X509Certificate;
0 11 3 masterKeyPath Ljava/lang/String;
2 6 4 signVerify Ljava/security/Signature;
10 11 4 signVerify Ljava/security/Signature;
1 11 5 verificationSuccess Z
7 10 6 e Ljava/security/GeneralSecurityException;
8 10 7 form Ljava/text/MessageFormat;
9 10 8 msgArgs [Ljava/lang/Object;
Exception table:
from to target type
1 5 6 Class java.security.InvalidKeyException
1 5 6 Class java.security.NoSuchAlgorithmException
1 5 6 Class java.security.SignatureException
Exceptions:
throws com.microsoft.sqlserver.jdbc.SQLServerException
MethodParameters:
Name Flags
hash
signature
certificate
masterKeyPath
private static short convertTwoBytesToShort(byte[], int);
descriptor: ([BI)S
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=7, locals=4, args_size=2
start local 0 start local 1 0: iload 1
iconst_1
iadd
aload 0
arraylength
if_icmplt 4
1: new com.microsoft.sqlserver.jdbc.SQLServerException
dup
aconst_null
ldc "R_ByteToShortConversion"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.getErrString:(Ljava/lang/String;)Ljava/lang/String;
aconst_null
iconst_0
2: iconst_0
3: invokespecial com.microsoft.sqlserver.jdbc.SQLServerException.<init>:(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;IZ)V
athrow
4: StackMap locals:
StackMap stack:
iconst_2
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
astore 3
start local 3 5: aload 3
getstatic java.nio.ByteOrder.LITTLE_ENDIAN:Ljava/nio/ByteOrder;
invokevirtual java.nio.ByteBuffer.order:(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
pop
6: aload 3
aload 0
iload 1
baload
invokevirtual java.nio.ByteBuffer.put:(B)Ljava/nio/ByteBuffer;
pop
7: aload 3
aload 0
iload 1
iconst_1
iadd
baload
invokevirtual java.nio.ByteBuffer.put:(B)Ljava/nio/ByteBuffer;
pop
8: aload 3
iconst_0
invokevirtual java.nio.ByteBuffer.getShort:(I)S
istore 2
start local 2 9: iload 2
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 input [B
0 10 1 index I
9 10 2 shortVal S
5 10 3 byteBuffer Ljava/nio/ByteBuffer;
Exceptions:
throws com.microsoft.sqlserver.jdbc.SQLServerException
MethodParameters:
Name Flags
input
index
}
SourceFile: "KeyStoreProviderCommon.java"