com.huawei.opengauss.jdbc.ssl.DbKeyStoreSocketFactory.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opengaussjdbc Show documentation
Show all versions of opengaussjdbc Show documentation
HuaweiCloud JDBC for GaussDB
The newest version!
???? 4 ? 5com/huawei/opengauss/jdbc/ssl/DbKeyStoreSocketFactory ,com/huawei/opengauss/jdbc/ssl/WrappedFactory DbKeyStoreSocketFactory.java Ocom/huawei/opengauss/jdbc/ssl/DbKeyStoreSocketFactory$DbKeyStoreSocketException DbKeyStoreSocketException ()V &java/security/GeneralSecurityException java/io/FileNotFoundException
java/io/IOException
JKS java/security/KeyStore getInstance ,(Ljava/lang/String;)Ljava/security/KeyStore;
getKeyStorePassword ()[C
getKeyStoreStream ()Ljava/io/InputStream;
! load (Ljava/io/InputStream;[C)V # $
% java/lang/StringBuilder '
( Failed to load keystore: * append -(Ljava/lang/String;)Ljava/lang/StringBuilder; , -
( .
getMessage ()Ljava/lang/String; 0 1
2 toString 4 1
( 5 (Ljava/lang/String;)V 7
8 Failed to find keystore file. :
2 Failed to read keystore file: =
2 [C @ javax/net/ssl/KeyManagerFactory B getDefaultAlgorithm D 1
C E 5(Ljava/lang/String;)Ljavax/net/ssl/KeyManagerFactory; G
C H init (Ljava/security/KeyStore;[C)V J K
C L !javax/net/ssl/TrustManagerFactory N
O E 7(Ljava/lang/String;)Ljavax/net/ssl/TrustManagerFactory; Q
O R (Ljava/security/KeyStore;)V J T
O U SSL W javax/net/ssl/SSLContext Y .(Ljava/lang/String;)Ljavax/net/ssl/SSLContext; [
Z \ getKeyManagers ()[Ljavax/net/ssl/KeyManager; ^ _
C ` getTrustManagers ()[Ljavax/net/ssl/TrustManager; b c
O d W([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V J f
Z g getSocketFactory "()Ljavax/net/ssl/SSLSocketFactory; i j
Z k _factory Ljavax/net/ssl/SSLSocketFactory; m n o *Failed to set up database socket factory: q keys Ljava/security/KeyStore; password gse (Ljava/security/GeneralSecurityException; fnfe Ljava/io/FileNotFoundException; ioe Ljava/io/IOException; keyfact !Ljavax/net/ssl/KeyManagerFactory; trustfact #Ljavax/net/ssl/TrustManagerFactory; ctx Ljavax/net/ssl/SSLContext; this 7Lcom/huawei/opengauss/jdbc/ssl/DbKeyStoreSocketFactory; Code LocalVariableTable LineNumberTable
StackMapTable
Exceptions
SourceFile InnerClasses!
? ?*? ? L*? M+*? ",? &? `N? Y? (Y? )+? /-? 3? /? 6? 9?N? Y? (Y? );? /-?