com.groupbyinc.flux.common.http.ssl.SSLContextBuilder.class Maven / Gradle / Ivy
???? 2 5com/groupbyinc/flux/common/http/ssl/SSLContextBuilder java/lang/Object SSLContextBuilder.java Hcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder$KeyManagerDelegate KeyManagerDelegate Jcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder$TrustManagerDelegate TrustManagerDelegate TLS Ljava/lang/String; protocol keymanagers Ljava/util/Set; +Ljava/util/Set;
trustmanagers -Ljava/util/Set; secureRandom Ljava/security/SecureRandom; create 9()Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; ()V
java/util/LinkedHashSet
! # this 7Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; useProtocol K(Ljava/lang/String;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder;
) setSecureRandom U(Ljava/security/SecureRandom;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; - loadTrustMaterial ?(Ljava/security/KeyStore;Lcom/groupbyinc/flux/common/http/ssl/TrustStrategy;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; &java/security/NoSuchAlgorithmException 1 java/security/KeyStoreException 3 !javax/net/ssl/TrustManagerFactory 5 getDefaultAlgorithm ()Ljava/lang/String; 7 8
6 9 getInstance 7(Ljava/lang/String;)Ljavax/net/ssl/TrustManagerFactory; ; <
6 = init (Ljava/security/KeyStore;)V ? @
6 A getTrustManagers ()[Ljavax/net/ssl/TrustManager; C D
6 E [Ljavax/net/ssl/TrustManager; G javax/net/ssl/X509TrustManager I V(Ljavax/net/ssl/X509TrustManager;Lcom/groupbyinc/flux/common/http/ssl/TrustStrategy;)V K
L
java/util/Set N add (Ljava/lang/Object;)Z P Q O R tm Ljavax/net/ssl/TrustManager; i I arr$ len$ i$
truststore Ljava/security/KeyStore;
trustStrategy 3Lcom/groupbyinc/flux/common/http/ssl/TrustStrategy; tmfactory #Ljavax/net/ssl/TrustManagerFactory; tms l(Lcom/groupbyinc/flux/common/http/ssl/TrustStrategy;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; / 0
c |(Ljava/io/File;[CLcom/groupbyinc/flux/common/http/ssl/TrustStrategy;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; 'java/security/cert/CertificateException f java/io/IOException h Truststore file j )com/groupbyinc/flux/common/http/util/Args l notNull 8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; n o
m p java/security/KeyStore r getDefaultType t 8
s u ,(Ljava/lang/String;)Ljava/security/KeyStore; ; w
s x java/io/FileInputStream z (Ljava/io/File;)V |
{ } load (Ljava/io/InputStream;[C)V ?
s ? close ?
{ ? java/io/File ? [C ? 1com/groupbyinc/flux/common/http/ssl/TrustStrategy ? java/lang/Throwable ? file Ljava/io/File;
storePassword
trustStore instream Ljava/io/FileInputStream; I(Ljava/io/File;[C)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; / e
? G(Ljava/io/File;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; / ?
? |(Ljava/net/URL;[CLcom/groupbyinc/flux/common/http/ssl/TrustStrategy;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; Truststore URL ? java/net/URL ?
openStream ()Ljava/io/InputStream; ? ?
? ? java/io/InputStream ?
? ? url Ljava/net/URL; Ljava/io/InputStream; I(Ljava/net/URL;[C)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; / ?
? loadKeyMaterial ?(Ljava/security/KeyStore;[CLcom/groupbyinc/flux/common/http/ssl/PrivateKeyStrategy;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; 'java/security/UnrecoverableKeyException ? javax/net/ssl/KeyManagerFactory ?
? 9 5(Ljava/lang/String;)Ljavax/net/ssl/KeyManagerFactory; ; ?
? ? (Ljava/security/KeyStore;[C)V ? ?
? ? getKeyManagers ()[Ljavax/net/ssl/KeyManager; ? ?
? ? [Ljavax/net/ssl/KeyManager; ? $javax/net/ssl/X509ExtendedKeyManager ? a(Ljavax/net/ssl/X509ExtendedKeyManager;Lcom/groupbyinc/flux/common/http/ssl/PrivateKeyStrategy;)V ?
? km Ljavax/net/ssl/KeyManager; keystore keyPassword
aliasStrategy 8Lcom/groupbyinc/flux/common/http/ssl/PrivateKeyStrategy; kmfactory !Ljavax/net/ssl/KeyManagerFactory; kms S(Ljava/security/KeyStore;[C)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; ? ?
? ?(Ljava/io/File;[C[CLcom/groupbyinc/flux/common/http/ssl/PrivateKeyStrategy;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder;
Keystore file ? 6com/groupbyinc/flux/common/http/ssl/PrivateKeyStrategy ?
identityStore K(Ljava/io/File;[C[C)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; ? ?
? ?(Ljava/net/URL;[C[CLcom/groupbyinc/flux/common/http/ssl/PrivateKeyStrategy;)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; Keystore URL ? K(Ljava/net/URL;[C[C)Lcom/groupbyinc/flux/common/http/ssl/SSLContextBuilder; ? ?
? initSSLContext e(Ljavax/net/ssl/SSLContext;Ljava/util/Collection;Ljava/util/Collection;Ljava/security/SecureRandom;)V $java/security/KeyManagementException ? java/util/Collection ? isEmpty ()Z ? ? ? ? size ()I ? ? ? ? javax/net/ssl/KeyManager ? toArray (([Ljava/lang/Object;)[Ljava/lang/Object; ? ? ? ? javax/net/ssl/SSLContext ? java/security/SecureRandom ? javax/net/ssl/TrustManager ? W([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V ? ?
? ?
sslcontext Ljavax/net/ssl/SSLContext; keyManagers 2Ljava/util/Collection; Ljava/util/Collection;
trustManagers 4Ljava/util/Collection; build ()Ljavax/net/ssl/SSLContext; java/lang/String .(Ljava/lang/String;)Ljavax/net/ssl/SSLContext; ;
? ? ?
ConstantValue Signature Code LineNumberTable LocalVariableTable
StackMapTable
Exceptions LocalVariableTypeTable ?(Ljavax/net/ssl/SSLContext;Ljava/util/Collection;Ljava/util/Collection;Ljava/security/SecureRandom;)V
SourceFile InnerClasses !
? Y? ? U Q *? *? Y? ? "*? Y? ? $? % &