This is a simple util with which users can create a private key and CSR for sending to an Certificate Authority for signing.
PKI Util creates private RSA keys with 4096 bits and then creates a Certificate Signing Request with the given input using the sha256withRSAEncryption signature algorithm.
The created key and CSR are written to a file and have the password "changeit" - which is the default for Java Key Stores.
Once the CSR has been signed by a CA, the PKI Util can be used once again to create a PKCS12 and JKS export. The prior can be used in a web browser as a client certificate, and the latter as a KeyStore in Java based applications.
The latest version can be downloaded from:
https://jenkins.eitchnet.ch/view/eitchnet/job/ch.eitchnet.pki/ch.eitchnet$ch.eitchnet.pki/
openssl genrsa -des3 -out ca.key 4096 openssl req -new -sha256 -x509 -days 365 -key ca.key -out ca.crt
openssl genrsa -des3 -out client.key 4096 openssl req -new -sha256 -key client.key -out client.csr
openssl x509 -req -sha256 -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 101 -extensions client -outform PEM -out client.crt
openssl pkcs12 -export -inkey client.key -in client.crt -out client.p12
openssl pkcs12 -nocerts -in client.p12 -out client.key openssl pkcs12 -clcerts -nokeys -in client.p12 -out client.crt
keytool -import -file ca.crt -alias CA -keystore CA_TrustStore.jks
keytool -importkeystore -destkeystore KeyStore.jks -srckeystore client.p12 -srcstoretype PKCS12
openssl req -text -noout -verify -in client.csr
openssl rsa -in client.key -check -noout
openssl x509 -in client.crt -text -noout
openssl pkcs12 -info -in client.p12 -noout