
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?
f t
t
r
t
!
"
#
$
%
&'
(
)
*
t+,-
./
.012 t34
$5
$6
$7
$89
:;
:<=
->
?@
?AB
CD
1>
EFG????????HDI
tJ rK
tL
EM
NO
NPQ
@R
@S
NT
@U
NV
tW
NX
@Y
NZ[
$\8]
t^_
t`
abc
Qd
Qef
Td
gh
gi
jk
alm
En
op
oq
rs
otuvwx
cd
ayz{|}~?
????
t?
n??
??? 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;? ??, 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;??? 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;G ,(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 I?Q ???I 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 is? ?? getKeyManagerFactory M(Ljava/security/KeyStore;Ljava/lang/String;)Ljavax/net/ssl/KeyManagerFactory; kmf !Ljavax/net/ssl/KeyManagerFactory; (Ljava/security/GeneralSecurityException;? 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 { w x y z X.509???? ? 'java/security/cert/CertificateException???? ? ? ? java/security/PublicKey ? ? java/security/cert/TrustAnchor??? {???? #java/security/cert/X509CertSelector???????????? (java/security/cert/PKIXBuilderParameters {????? ? ? java/lang/Exception PKIX???????? u v java/lang/StringBuilder build passed, path contents: ??????????? ? %java/security/spec/X509EncodedKeySpec {?????? java/io/ByteArrayInputStream???? ?? /java/security/cert/CertificateEncodingException? java/security/PrivateKey ? ? ? ? ? ???????? java/io/BufferedInputStream {?????? ?? ? ????? ?? signature verifies: ???? ? ? PKCS12 ? ???? java/io/File {??? java/io/FileInputStream?????????? keystore created: ???????????? 'java/security/UnrecoverableKeyException &java/security/NoSuchAlgorithmException java/security/KeyStoreException java/io/FileOutputStream?? java/lang/Object help this help gencert =creates a certificate : [issuer-dn] [public-key] vercert #verifies a certificate: ??? de/tsl2/nano/core/Argumentator PKI {? 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/GeneralSecurityException %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 exists ()Z java/lang/Thread
currentThread ()Ljava/lang/Thread; getContextClassLoader ()Ljava/lang/ClassLoader; java/lang/ClassLoader getResourceAsStream load (Ljava/io/InputStream;[C)V -(Ljava/io/InputStream;Z)Ljava/io/InputStream; javax/net/ssl/KeyManagerFactory getDefaultAlgorithm 5(Ljava/lang/String;)Ljavax/net/ssl/KeyManagerFactory; toCharArray ()[C init (Ljava/security/KeyStore;[C)V 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; ! t f u v w x y z { | } Y *? *+? *,? ? ~ J K L M ? ? w x ? z ? ? } ? ? M,+? ?M,? W? ~ W X Y
Z [ * ? ?
? ? ? ? ? ? ? L ? ? ? } v ? L+*? ?L+? W? ~ g h i
j k ? ?
? ? ? ? ? L ? ? ? } ] +*? ,-*? ?
? ? ? ~ r * ? ? ? z ? ? ? ? ? ? } { |+? ?
Y+? ? ? ? :? Y? :+? +? ? *? ? ? -? ?YT? ? Y? :? ,? ? ?:? W? q r ~ B ? ? ? $ ? ( ? 1 ? : ? A ? G ? S ? ` ? f ? l ? r ? t ? z ? \ W ? ? $ N ? ? ` ? ? t ? ? | ? z | ? z | ? ? | ? ? | ? ? ? W ? ? ? ) @ ?? ? ?? @ ? ? ? ? ? ? ? ? } ? 8? L+*? !M,? " N? #? $Y? %&? '-? (? )? * -?L+? W? / 0 ~ " ? ? ? ? . ? 0 ? 1 ? 6 ? 4 * ? ? $ ? ? ? ? 1 ? ? 8 ? ? ? p ? ? ? } ? M? +M,*+? ,N-?N-? W? ~ ? ? ? ? ? ? ? 4 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } ? ? -Y*? .M+? /N-,? 0?M,? W? ~ ? ? ? ? ? ? 4 ? ? ? ? ? ? ? ? ? ? ? T ? ? ? } y ? 1Y*? 2? 3+? 4?M,? W 6? 5 ~ ? ? ? ? ? ? ? ? ? ? ? Q ? ? ? } G ? 1Y*? 8 ? 3+? 4? ~ ? ? ? ? ? ? ? } D *+*? ?
? 9? :? ~ ? ? ? ? ? ? ? } K
+*? ? ;,?