de.tsl2.nano.core.secure.PKI.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.terminal Show documentation
Show all versions of tsl2.nano.terminal Show documentation
TSL2 Framework Terminal (Console Application Framework named SIShell, providing Actions, Options, Commands, Inputs, lots of Selectors, PlatformManagement)
???? 4?
Z ? h ? h ? ?
f
h
?
h
!" h#$
$ ?%
$&
$'
$()
*+
*,-
-.
/0
/12
34
1.
567????????849
h: f;
h<
5=
>?
>@A
@B
@C
>D
@E
>F
hG
>H
@I
>JK
$L(M
hNO
hP
QRS
QT
QUV
5WX
VT
YZ
Q[\]^_`ab
cdef
hg
bhi
jkl LOG Lorg/apache/commons/logging/Log; crypt Lde/tsl2/nano/core/secure/Crypt; issuer .Lde/tsl2/nano/core/secure/TrustedOrganisation; Q(Lde/tsl2/nano/core/secure/Crypt;Lde/tsl2/nano/core/secure/TrustedOrganisation;)V Code LineNumberTable LocalVariableTable this Lde/tsl2/nano/core/secure/PKI; orga createCertificate 7(Ljava/io/InputStream;)Ljava/security/cert/Certificate; certFactory 'Ljava/security/cert/CertificateFactory; e )Ljava/security/cert/CertificateException; certEncoded Ljava/io/InputStream;
StackMapTable createCertPath 4(Ljava/io/InputStream;)Ljava/security/cert/CertPath; m(Lde/tsl2/nano/core/secure/TrustedOrganisation;Ljava/util/Date;Ljava/util/Date;)Ljava/security/cert/CertPath; subjectDN startDate Ljava/util/Date; expiringDate ?(Lde/tsl2/nano/core/secure/TrustedOrganisation;Lde/tsl2/nano/core/secure/TrustedOrganisation;Ljava/util/Date;Ljava/util/Date;Ljava/security/PublicKey;)Ljava/security/cert/CertPath; trustAnchors Ljava/util/Set; targetConstraints %Ljava/security/cert/X509CertSelector; params *Ljava/security/cert/PKIXBuilderParameters; Ljava/lang/Exception; issuerDN subjectPublicKey Ljava/security/PublicKey; LocalVariableTypeTable 1Ljava/util/Set;mno F(Ljava/security/cert/CertPathParameters;)Ljava/security/cert/CertPath; cpb $Ljava/security/cert/CertPathBuilder; cpbResult *Ljava/security/cert/CertPathBuilderResult; cp Ljava/security/cert/CertPath; 'Ljava/security/cert/CertPathParameters; verifyCertPath r(Ljava/security/cert/CertPath;Ljava/security/cert/CertPathParameters;)Ljava/security/cert/CertPathValidatorResult; cpvResult ,Ljava/security/cert/CertPathValidatorResult; cpv &Ljava/security/cert/CertPathValidator;pqr createPublicKey )([BLjava/lang/String;)Ljava/security/Key;
pubKeySpec 'Ljava/security/spec/X509EncodedKeySpec;
keyFactory Ljava/security/KeyFactory;
encodedKey [B algorithm Ljava/lang/String; write 9(Ljava/security/cert/Certificate;Ljava/io/OutputStream;)J 1Ljava/security/cert/CertificateEncodingException; cert Ljava/security/cert/Certificate; out Ljava/io/OutputStream;7 ,(Ljava/security/Key;Ljava/io/OutputStream;)J key Ljava/security/Key; sign (Ljava/io/InputStream;)[B data 3(Ljava/io/InputStream;Ljava/security/PrivateKey;)[B
privateKey Ljava/security/PrivateKey; B(Ljava/lang/String;Ljava/lang/String;Ljava/security/PrivateKey;)[B file E(Ljava/io/InputStream;Ljava/lang/String;Ljava/security/PrivateKey;)[B signature Ljava/security/Signature; bufin Ljava/io/BufferedInputStream; buffer len IsA ?tu9 verify (Ljava/io/InputStream;[B)Z E(Ljava/io/InputStream;[BLjava/security/PublicKey;Ljava/lang/String;)Z sig verifies Z createKeyStore ()Ljava/security/KeyStore; .(Ljava/lang/String;[C)Ljava/security/KeyStore; password [C @(Ljava/lang/String;Ljava/lang/String;[C)Ljava/security/KeyStore; ks Ljava/security/KeyStore; ex type fis Ljava/io/FileInputStream;Sv ?w peristKeyStore ?(Ljava/security/KeyStore;Ljava/lang/String;Ljava/lang/String;)V keyStore manual ()Ljava/util/Map; Signature 7()Ljava/util/Map; main ([Ljava/lang/String;)V args [Ljava/lang/String; ()V
SourceFile PKI.java o ? k l m n X.509xyz{ x 'java/security/cert/CertificateException|}~ ? ? ? java/security/PublicKey ? ? java/security/cert/TrustAnchorn?? o???? #java/security/cert/X509CertSelector???????????? (java/security/cert/PKIXBuilderParameters o????? ? ? java/lang/Exception PKIX?y?????? i j java/lang/StringBuilder build passed, path contents: ???????ry?? ? %java/security/spec/X509EncodedKeySpec o??y??? java/io/ByteArrayInputStream???? ?? /java/security/cert/CertificateEncodingException? java/security/PrivateKey ? ? ? ? ? ???sy??? java/io/BufferedInputStream o?????? ? ?? ? ????? ?? signature verifies: ???? ? ? PKCS12 ? ?vy? java/io/FileInputStream o??? keystore created: ?? java/io/FileOutputStreamu???? java/lang/Object help this help gencert =creates a certificate : [issuer-dn] [public-key] vercert #verifies a certificate: ??? de/tsl2/nano/core/Argumentator PKI ? ? o? de/tsl2/nano/core/secure/Crypt??? de/tsl2/nano/core/secure/PKI
java/util/Set ,de/tsl2/nano/core/secure/TrustedOrganisation java/util/Date java/security/cert/CertPath %java/security/cert/CertPathParameters $java/security/cert/CertPathValidator java/security/Signature java/io/InputStream java/lang/String java/security/KeyStore java/lang/Throwable %java/security/cert/CertificateFactory getInstance ;(Ljava/lang/String;)Ljava/security/cert/CertificateFactory; generateCertificate "de/tsl2/nano/core/ManagedException forward ,(Ljava/lang/Throwable;)Ljava/lang/Throwable; generateCertPath toString ()Ljava/lang/String; 0(Ljava/lang/String;Ljava/security/PublicKey;[B)V java/util/Collections singleton #(Ljava/lang/Object;)Ljava/util/Set; toX500Principal *()Ljavax/security/auth/x500/X500Principal; setIssuer +(Ljavax/security/auth/x500/X500Principal;)V
setSubject setSubjectPublicKey (Ljava/security/PublicKey;)V setCertificateValid (Ljava/util/Date;)V setKeyUsage ([Z)V 3(Ljava/util/Set;Ljava/security/cert/CertSelector;)V setRevocationEnabled (Z)V setDate "java/security/cert/CertPathBuilder 8(Ljava/lang/String;)Ljava/security/cert/CertPathBuilder; build S(Ljava/security/cert/CertPathParameters;)Ljava/security/cert/CertPathBuilderResult; (java/security/cert/CertPathBuilderResult getCertPath ()Ljava/security/cert/CertPath; append -(Ljava/lang/String;)Ljava/lang/StringBuilder; -(Ljava/lang/Object;)Ljava/lang/StringBuilder; org/apache/commons/logging/Log debug (Ljava/lang/Object;)V :(Ljava/lang/String;)Ljava/security/cert/CertPathValidator; validate ([B)V java/security/KeyFactory .(Ljava/lang/String;)Ljava/security/KeyFactory; generatePublic 7(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey; java/security/cert/Certificate
getEncoded ()[B de/tsl2/nano/core/util/FileUtil /(Ljava/io/InputStream;Ljava/io/OutputStream;Z)J java/security/Key getFile )(Ljava/lang/String;)Ljava/io/InputStream; -(Ljava/lang/String;)Ljava/security/Signature; initSign (Ljava/security/PrivateKey;)V (Ljava/io/InputStream;)V read ([B)I update ([BII)V close
initVerify available ()I ([B)Z (Z)Ljava/lang/StringBuilder; info ,(Ljava/lang/String;)Ljava/security/KeyStore; (Ljava/lang/String;)V load (Ljava/io/InputStream;[C)V -(Ljava/io/InputStream;Z)Ljava/io/InputStream; toCharArray ()[C store (Ljava/io/OutputStream;[C)V de/tsl2/nano/core/util/MapUtil asMap $([Ljava/lang/Object;)Ljava/util/Map; 7(Ljava/lang/String;Ljava/util/Map;[Ljava/lang/String;)V de/tsl2/nano/core/log/LogFactory getLog 3(Ljava/lang/Class;)Lorg/apache/commons/logging/Log; ! h Z i j k l m n o p q Y *? *+? *,? ? r D E F G s t u k l v n w x q ? ? M,+? ?M,? W? r Q R S
T U s * y z
{ | t u } ~ L ? ? ? q v ? L+*? ?L+? W? r a b c
d e s y z
{ | } ~ L ? ? ? q ] +*? ,-*? ?
? ? ? r l s * t u ? n ? ? ? ? ? ? q { |+? ?
Y+? ? ? ? :? Y? :+? +? ? *? ? ? -? ?YT? ? Y? :? ,? ? ?:? W? q r r B ? ? $ ? ( ? 1 ? : ? A ? G ? S ? ` ? f ? l ? r ? t ? z ? s \ W ? ? $ N ? ? ` ? ? t { ? | ? n | ? n | ? ? | ? ? | ? ? ? W ? ? ) @ ?? ? ?? @ ? ? ? ? ? ? ? ? q ? 8? L+*? !M,? " N? #? $Y? %&? '-? (? )? * -?L+? W? / 0 r " ? ? ? ? . ? 0 ? 1 ? 6 ? s 4 * ? ? $ ? ? ? ? 1 { ? 8 ? ? p ? ? ? q ? M? +M,*+? ,N-?N-? W? r ? ? ? ? ? ? ? s 4 ? ? { ? ? ? ? ? ? ? ? ? ? ? ? ? ? q ? ? -Y*? .M+? /N-,? 0?M,? W? r ? ? ? ? ? ? s 4 ? ? ? ? { ? ? ? ? ? T ? ? ? q y ? 1Y*? 2? 3+? 4?M,? W 6? 5 r ? ? ? ? s { ? ? ? ? ? Q ? ? ? q G ? 1Y*? 8 ? 3+? 4? r ? s ? ? ? ? ? ? q D *+*? ?
? 9? :? r ? s t u ? ~ ? ? q K
+*? ? ;,?