All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.huawei.opengauss.jdbc.ssl.LazyKeyManager.class Maven / Gradle / Ivy

The newest version!
????4?,com/huawei/opengauss/jdbc/ssl/LazyKeyManagerjava/lang/Objectjavax/net/ssl/X509KeyManagerLazyKeyManager.javaAcom/huawei/opengauss/jdbc/ssl/LibPQFactory$ConsoleCallbackHandler*com/huawei/opengauss/jdbc/ssl/LibPQFactory
ConsoleCallbackHandlercert%[Ljava/security/cert/X509Certificate;keyLjava/security/PrivateKey;certfileLjava/lang/String;keyfilecbh.Ljavax/security/auth/callback/CallbackHandler;defaultfileZerror.Lcom/huawei/opengauss/jdbc/util/PSQLException;privateKeyFactoryprivateKeyFactoryClsLjava/lang/Class;Ljava/lang/Class<*>;pkFactoryClsNotFoundLOGGER#Lcom/huawei/opengauss/jdbc/log/Log;h(Ljava/lang/String;Ljava/lang/String;Ljavax/security/auth/callback/CallbackHandler;ZLjava/lang/String;)V()V!#
$
	&	(	*	,	.	0	2	4	6this.Lcom/huawei/opengauss/jdbc/ssl/LazyKeyManager;
keyFactorythrowKeyManagerException,com/huawei/opengauss/jdbc/util/PSQLException<chooseClientAliasR([Ljava/lang/String;[Ljava/security/Principal;Ljava/net/Socket;)Ljava/lang/String;user@getCertificateChain9(Ljava/lang/String;)[Ljava/security/cert/X509Certificate;BC
D"java/security/cert/X509CertificateGgetIssuerX500Principal*()Ljavax/security/auth/x500/X500Principal;IJ
HK[Ljava/lang/String;M[Ljava/security/Principal;Ojava/net/SocketQ&javax/security/auth/x500/X500PrincipalSequals(Ljava/lang/Object;)ZUV
TWjava/lang/StringYissuerLjava/security/Principal;	ourissuer(Ljavax/security/auth/x500/X500Principal;found	certchainkeyTypeissuerssocketLjava/net/Socket;chooseServerAliasQ(Ljava/lang/String;[Ljava/security/Principal;Ljava/net/Socket;)Ljava/lang/String;'java/security/cert/CertificateExceptiongjava/io/FileNotFoundExceptioniX.509k%java/security/cert/CertificateFactorymgetInstance;(Ljava/lang/String;)Ljava/security/cert/CertificateFactory;op
nqVCould not find a java cryptographic algorithm: X.509 CertificateFactory not available.s!com/huawei/opengauss/jdbc/util/GTutr9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;wx
vy(com/huawei/opengauss/jdbc/util/PSQLState{CONNECTION_FAILURE*Lcom/huawei/opengauss/jdbc/util/PSQLState;}~	|T(Ljava/lang/String;Lcom/huawei/opengauss/jdbc/util/PSQLState;Ljava/lang/Throwable;)V!?
=?java/io/FileInputStream?(Ljava/lang/String;)V!?
??generateCertificates-(Ljava/io/InputStream;)Ljava/util/Collection;??
n?(Could not open SSL certificate file {0}.?9Loading the SSL certificate {0} into a KeyManager failed.?java/util/Collection?size()I????toArray(([Ljava/lang/Object;)[Ljava/lang/Object;????cf'Ljava/security/cert/CertificateFactory;ex)Ljava/security/cert/CertificateException;certs9Ljava/util/Collection<+Ljava/security/cert/Certificate;>;Ljava/util/Collection;ioexLjava/io/FileNotFoundException;gsexaliasgetClientAliasesA(Ljava/lang/String;[Ljava/security/Principal;)[Ljava/lang/String;>?
?
getPrivateKey.(Ljava/lang/String;)Ljava/security/PrivateKey;*java/security/spec/InvalidKeySpecException?java/lang/Exception?#javax/crypto/NoSuchPaddingException?9javax/security/auth/callback/UnsupportedCallbackException?&java/security/GeneralSecurityException?java/io/IOException?&java/security/NoSuchAlgorithmException?java/io/RandomAccessFile?java/io/File?
??r?#(Ljava/io/File;Ljava/lang/String;)V!?
??throwNotDefaultFileException"(Ljava/io/FileNotFoundException;)V??
?length()J??
??	readFully([B)V??
??close?#
??getPublicKey()Ljava/security/PublicKey;??
H?java/security/PublicKey?getAlgorithm()Ljava/lang/String;????java/security/KeyFactory?.(Ljava/lang/String;)Ljava/security/KeyFactory;o?
??&java/security/spec/PKCS8EncodedKeySpec?!?
??generatePrivate8(Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;??
??[B?resolvePrivateKey??
?$javax/crypto/EncryptedPrivateKeyInfo?
??;com/huawei/opengauss/jdbc/ssl/BouncyCastlePrivateKeyFactory?
?$getPassword1()Ljavax/security/auth/callback/PasswordCallback;??
?getPrivateKeyFromEncryptedKeyM([BLjavax/security/auth/callback/PasswordCallback;)Ljava/security/PrivateKey;??
??
getAlgName??
??javax/crypto/Cipher)(Ljava/lang/String;)Ljavax/crypto/Cipher;o

getMessage?
?*(Ljava/lang/String;Ljava/lang/Throwable;)V!
?	-javax/security/auth/callback/PasswordCallbackEnter SSL password: 
(Ljava/lang/String;Z)V!
%javax/security/auth/callback/Callback,javax/security/auth/callback/CallbackHandlerhandle+([Ljavax/security/auth/callback/Callback;)VthrowUnsupportedException>(Ljavax/security/auth/callback/UnsupportedCallbackException;)V
javax/crypto/spec/PBEKeySpec()[C? 
!([C)V!#
$
clearPassword&#
'javax/crypto/SecretKeyFactory)3(Ljava/lang/String;)Ljavax/crypto/SecretKeyFactory;o+
*,generateSecret6(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;./
*0getAlgParameters%()Ljava/security/AlgorithmParameters;23
?4init:(ILjava/security/Key;Ljava/security/AlgorithmParameters;)V67
8
getKeySpec?(Ljavax/crypto/Cipher;)Ljava/security/spec/PKCS8EncodedKeySpec;:;
?<#Could not decrypt SSL key file {0}.>throwIOException2(Ljava/io/RandomAccessFile;Ljava/io/IOException;)V@A
B3Could not find a java cryptographic algorithm: {0}.D
?Could not get primary key: {0}.G
?pkcs8KeySpecLjava/security/spec/KeySpec;	pkFactory=Lcom/huawei/opengauss/jdbc/ssl/BouncyCastlePrivateKeyFactory;eLjava/lang/Exception;cipherLjavax/crypto/Cipher;npex%Ljavax/crypto/NoSuchPaddingException;ucex;Ljavax/security/auth/callback/UnsupportedCallbackException;
pbeKeySpecLjavax/crypto/spec/PBEKeySpec;skFacLjavax/crypto/SecretKeyFactory;pbeKeyLjava/security/Key;	algParams#Ljava/security/AlgorithmParameters;ikex(Ljava/security/GeneralSecurityException;ePKInfo&Ljavax/crypto/EncryptedPrivateKeyInfo;pwdcb/Ljavax/security/auth/callback/PasswordCallback;,Ljava/security/spec/InvalidKeySpecException;keydatakfLjava/security/KeyFactory;Ljava/io/IOException;(Ljava/security/NoSuchAlgorithmException;rafLjava/io/RandomAccessFile;getServerAliases 	mCatch IOException on close:o!com/huawei/opengauss/jdbc/log/Logqtrace*(Ljava/lang/Object;Ljava/lang/Throwable;)Vstru Could not read SSL key file {0}.wConsole is not availabley
?
ZWCCould not read password for SSL key file, console is not available.}@Could not read password for SSL key file by callbackhandler {0}.getClass()Ljava/lang/Class;??
?java/lang/Class?getName??
?? java/lang/ClassNotFoundException?loadPrivateKeyFacotryClass?#
?	?newInstance()Ljava/lang/Object;??
??/com/huawei/opengauss/jdbc/ssl/PrivateKeyFactory???"Ljava/lang/ClassNotFoundException;Ljava/lang/Object;forName%(Ljava/lang/String;)Ljava/lang/Class;??
??java/lang/Throwable?$com/huawei/opengauss/jdbc/log/Logger?	getLogger7(Ljava/lang/String;)Lcom/huawei/opengauss/jdbc/log/Log;??
??	SignatureCodeLocalVariableTableLineNumberTable
StackMapTable
ExceptionsLocalVariableTypeTable
SourceFileInnerClasses!
?
 !"??4*?%*?'*?)*?+*?-*+?/*,?1*-?3*?5*?7??>48944444:?.H4	5:=IJ"K'L-M3N;#?H
*?+?*?+???
89?WXZ??=>??Il*?/??,?,??A?*A?E:???d2?L:6,:?66		?	2:

?X?6?	????A???RM
[\
1;]^48_O`l89laMlbOlcd?:^_	adij"k$m1n4oMpWqZo`t?3		?F?
NPRFTP?	@Zef?J??*89abOcd?|BC???*?'??*?/??l?rM?N*?=Yt??z??-???+?,??Y*?/????N?R:*?5?#*?=Y??Y*?/S?z?????+?:*?=Y??Y*?/S?z?????+?*--???H???F?'*?'?h2BEj2Bph?\	????B??G)??r"??2x??????89???B??????J?????0?2?B?E?G?N?`?n?p?r????????3Wh?nRj?(j?Znh?#??????&*?ZY+S,?R??N-?
?Z??ZY-S??*&89&a&bO??
????ZGN???\?M*?)?*?1?x*?'?*A?E????Y??Y*?1?????M?N*-???,?ˈ?N,-??,??M*?'2?ֹ???:??Y-??:*??)?:*?7?
*-??*?)?:??Y-??:?!:??Y??:*-*?????)*?)????:?:??Y??
??Y??z?:*?3?YS??
:	*	???Y?"?%:	?(???-:

	?1:?5:?9?=:
*
??)?(:	*?=Y??Y*?1S?z??	???+??SN*,-?C?IN*?=YE?Y-?FS?z??-???+?N*?=YH?Y-?IS?z??-???+?*?)?"7:jh}????????????]`?!??"A??B?????????????!??"A??B?????????????!??"A??B???????????????;??rJK?LM?NO?PQ?RS
TU	 =VW	/.XY
8%Z[?\]RJK
b#^_	??`a??PQ??bc??dJ;e?hfg??h?"?i?"?O?89???jk?A???? ?"?7?:?;?@?B?J?O?S?U?h?r?}?????????????????????????????????????
??? ?%?/?8???I?R?]?`?b?u?????????????????????????????"?Wj?=Z???????Z??????L???(	Z??????	?M??$Z?B?I?b?"l??C?Z?? 89abO????O
*?5?+???
89
???
	?	?j@A??9+?+?ҧN?np-?v*?=Yx?Y*?1S?z??,???+???*?h9899jk9?h?8?K???Z*?3?	?,z+?{?|?*?=Y~??z??+???+?)*?=Y??Y*?3????S?z??+???+??Z89ZTU?" !#"3%E(L'Y+?3%????7*?-?2*???M*?-,?*????M*,??+*?????)?N-???03??4N?4NOL?7897e??2.04123570:38496=?N????????#??)*???$YL?*???**?7????+çM+?,?? ##&#?)89?@ABCE(G??D?????????Y??z?L*?3?Y+S??_M*?3?	?,z,?{?|?*?=Y~??z??,???+?)*?=Y??Y*?3????S?z??,???+?+?$'?? ([TU?89rbc?2JL$W'M(N6O?P[SmTtS?V?X??'??3?%????#?$?????n??>??
	




© 2015 - 2024 Weber Informatics LLC | Privacy Policy