Keytool and KeyStore, Self Signed Certificate file - Yash-777/Java_Mail GitHub Wiki
Server certificates may be "self-signed"
KeyStore Explorer: Generate Self-Sign the Certificate using following commands: with X.500 Distinguished Names
D:/Yash>keytool -genkey -alias MyServer -keyalg RSA -validity 1825 -keystore "D:/Yash/MyServe
r.jks" -storetype JKS -keypass password -storepass password -dname "CN=myserver.com,OU=My Company Na
me,O=My Organization,L=My Location,ST=My State,C=My Country Short Code"
Picked up _JAVA_OPTIONS: -Xmx512M
keytool error: java.lang.Exception: Key pair not generated, alias <MyServer> already exists
D:/Yash>keytool -genkey -alias MyServer2 -keyalg RSA -validity 1825 -keystore "D:/Yash/MyServ
er.jks" -storetype JKS -keypass password -storepass password -dname "CN=myserver.com,OU=My Company N
ame,O=My Organization,L=My Location,ST=My State,C=My Country Short Code"
Picked up _JAVA_OPTIONS: -Xmx512M
From the above MyServer.jks file holds two certificates with Unique alias names.
KeyStore Explorer Features
Export Length: Head Only/Entire Chain
| Export Format | PEM | File File Type |
Foramt |
|---|---|---|---|
| X.509 | PEM | (*.cer) Security Certificate |
[-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----] |
| PKCS#7 | PEM | (*.p7b) PKCS#7 Certificates |
[-----BEGIN PKCS7----- ... -----END PKCS7-----] |
| PKCS#7 | PEM | (*.p7b) PKCS#7 Certificates |
[-----BEGIN PKCS7----- ... -----END PKCS7-----] |
| PKI | (*.pkipath)) PKIPATH File |
[...] |
|
| SPC | (*.spc)) PKCS#7 Certificates |
[...] |
KeyStore Explorer can export the public keys of Key Pair and Trusted Certificate entries in OpenSSL (SubjectPublicKeyInfo) format.
alias.pub PEM format [-----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY-----]
alias.key PEM format [-----BEGIN RSA PRIVATE KEY----- ... -----END RSA PRIVATE KEY-----]
alias.pkcs8 PEM format [-----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----]
alias.pkv [...]signed message for Key Type:[Exchange, Signed]
Public Key Cryptography Standards (PKCS) wiki: These are a group of public-key cryptography standards devised and published by RSA Security LLC, starting in the early 1990s. The company published the standards to promote the use of the cryptography techniques to which they had patents, such as the RSA algorithm, the Schnorr signature algorithm and several others.
RSA (Rivest–Shamir–Adleman)wiki is one of the first public-key cryptosystems and is widely used for secure data transmission. In such a cryptosystem, the encryption key is public and it is different from the decryption key which is kept secret (private).
Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8 Download
