Showing posts with label keytool. Show all posts
Showing posts with label keytool. Show all posts

25 June 2015

SSL Command Center

WEBLOGIC

# to create a keystore.jks file (pair of keys)
$ keytool -genkey -keyalg RSA -alias benefits -keystore keystore.jks \
-storepass 123456 -keysize 2048 # to store a certificate in file $ keytool -export -alias benefits -file root.cer -keystore identity.jks -storepass 123456 # to create a csr request in form of myapp.csr file $ keytool -certreq -alias benefits -keystore keystore.jks -file myapp.csr # to generate the certificate as myapp.crt $ keytool -exportcert -alias benefits -keystore keystore.jks -v -file myapp.crt

# command to convert .pfx to .jks
$ /apps/java/current/bin/keytool -importkeystore -srckeystore wu046.abc.com.pfx \
-destkeystore servercertstore.jks -srcstoretype PKCS12 \
-deststoretype JKS -srcstorepass w3bl0g1c -deststorepass pa55w0rd -noprompt

# command to change alias name
$ /apps/java/current/bin/keytool -changealias \
-alias "28cc461f-fd2c-4405-abe6-ab009b8e89cc" \
-destalias wu046.abc.com -keypass w3bl0g1c \
-keystore servercertstore.jks -storepass pa55w0rd

SUNONE

# to view certificate installed on sunone instance
$ /usr/bin/certutil -d -P https-pricer-pfix-wxvrw99a0016- -L -n Server-Cert
# to list certificate installed on sunone instance with alias name $ /opt/sunone617/suitespot/bin/https/admin/bin/certutil \
-d /opt/sunone617/suitespot/alias \
-P https-saXXXit2.abc.com-wsszw2057- -L -n Server-Cert


APACHE

# Generate a key pair: (.key) $ openssl genrsa -des3 -out |.key file name| 1024/2048 # Generating a CSR (.crt), run from key file location and give all the required details $ openssl req -new -nodes -out |.crt file name| \
-neykey rsa:2048 -keyout |.key file name generated by above command # Create certificates: (.pem) $ openssl x509 -in name.crt -noout -text $ openssl x509 -subject -dates -issuer -noout -in name.crt # To open key file and check modules $ openssl rsa -noout -text -in application.key -modulus


Br,
Punit