
io.relayr.java.websocket.SslUtil.class Maven / Gradle / Ivy
???? 3 ? ?
?
D ? ?
? ?
? ?
D ? ?
? ?
? ?
? ?
? ?
?
? ?
? ? ? ?
? ?
?
?
?
?
?
?
?
$ ?
? ?
?
? ?
' ? ?
? ?
? ?
? ? ? ?
? ?
? ?
? ?
? ?
?
? ? ? ?
? ? ?
' ? ? ?
: ?
? ?
? ?
? ?
? ? ?
? ?
? ? ? PROPERTIES_FILE_NAME Ljava/lang/String;
ConstantValue ? CERTIFICATE_FILE_NAME ? sSslUtil "Lio/relayr/java/websocket/SslUtil; sCertificate Ljava/security/cert/Certificate;
properties Ljava/util/Properties; instance $()Lio/relayr/java/websocket/SslUtil; Code LineNumberTable init ()V LocalVariableTable e Ljava/io/IOException; this
StackMapTable ? ? getBroker ()Ljava/lang/String; getConnectOptions Y(Ljava/lang/String;Ljava/lang/String;)Lorg/eclipse/paho/client/mqttv3/MqttConnectOptions; username password connOpts 3Lorg/eclipse/paho/client/mqttv3/MqttConnectOptions; createSocketFactory "()Ljavax/net/ssl/SSLSocketFactory; )Ljava/security/cert/CertificateException; (Ljava/security/GeneralSecurityException; tmf #Ljavax/net/ssl/TrustManagerFactory;
sslContext Ljavax/net/ssl/SSLContext; ? ? ? ? createTrustManagerFactory %()Ljavax/net/ssl/TrustManagerFactory;
Exceptions loadCertificate "()Ljava/security/cert/Certificate; caInput Ljava/io/InputStream; cf 'Ljava/security/cert/CertificateFactory; ? createKeyStore :(Ljava/security/cert/Certificate;)Ljava/security/KeyStore; Ljava/lang/Exception; certificate keyStore Ljava/security/KeyStore; ? ? ?
getProperties ()Ljava/util/Properties;
SourceFile SslUtil.java K L io/relayr/java/websocket/SslUtil W V java/util/Properties O P v w M N ? ? /ssl.properties ? ? ? ? ? java/io/IOException ? V java/lang/StringBuilder
connection ? ? ? ? :// ? ? ` : port ? ` 1org/eclipse/paho/client/mqttv3/MqttConnectOptions ? ? ? ? ? ? g h ? ? ? ? ? ? ? ? java/lang/String ? ? s t 'java/security/cert/CertificateException ssl_type ? ? ? ? ? ? U ? &java/security/NoSuchAlgorithmException $java/security/KeyManagementException ? ? h ? ` ? ? } ~ U ? java/security/KeyStoreException X.509 ? ? ? #CertificateFactory creation failed! W ? java/io/BufferedInputStream /relayr2019.crt W ? ? ` ? ? ca ? java/lang/Object ssl.properties relayr2019.crt !javax/net/ssl/TrustManagerFactory javax/net/ssl/SSLContext &java/security/GeneralSecurityException %java/security/cert/CertificateFactory java/security/cert/Certificate java/security/KeyStore java/lang/Exception getClass ()Ljava/lang/Class; java/lang/Class getResourceAsStream )(Ljava/lang/String;)Ljava/io/InputStream; load (Ljava/io/InputStream;)V printStackTrace getProperty &(Ljava/lang/String;)Ljava/lang/String; append -(Ljava/lang/String;)Ljava/lang/StringBuilder; io/relayr/java/RelayrJavaApp getMqttApiPoint toString setCleanSession (Z)V setConnectionTimeout (I)V setKeepAliveInterval setSocketFactory (Ljavax/net/SocketFactory;)V setUserName (Ljava/lang/String;)V toCharArray ()[C setPassword ([C)V
setServerURIs ([Ljava/lang/String;)V getInstance .(Ljava/lang/String;)Ljavax/net/ssl/SSLContext; getTrustManagers ()[Ljavax/net/ssl/TrustManager; W([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V getSocketFactory getDefaultAlgorithm 7(Ljava/lang/String;)Ljavax/net/ssl/TrustManagerFactory; (Ljava/security/KeyStore;)V ;(Ljava/lang/String;)Ljava/security/cert/CertificateFactory; generateCertificate 7(Ljava/io/InputStream;)Ljava/security/cert/Certificate; getDefaultType ,(Ljava/lang/String;)Ljava/security/KeyStore; (Ljava/io/InputStream;[C)V setCertificateEntry 5(Ljava/lang/String;Ljava/security/cert/Certificate;)V ! D E F G H I F G J
K L
M N O P
Q R S ? ? T " U V S ' ? Y? ? ? T
&