Certificados TLS

From Wiki
Revision as of 12:24, 29 September 2022 by Ebasso (talk | contribs) (Criou a página com "= OpenSSL Cheat Sheet = # Download do certificado openssl s_client -connect <HOST:PORT> </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > <NOME_DO-ARQUI...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

OpenSSL Cheat Sheet

  1. Download do certificado
openssl s_client -connect <HOST:PORT> </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > <NOME_DO-ARQUIVO.cer>
ikeycmd -cert -add -db "<wlp_root>/usr/servers/defaultServer/resources/security/key.jks" \-file "NOME_DO-ARQUIVO.cer" -pw <PASSWORD> -label <LABEL_CERTIFICADO> > /dev/null

iKeyCmd Cheat Sheet

  1. List certificates
ikeycmd -cert -list personal -db "key.kdb" -pw changeit

ikeycmd -cert -list ca -db "key.kdb" -pw changeit
  1. Add a client certificate to keystore
ikeycmd -cert -add -db "key.kdb" -label ibmwebspheremqclient01 -file ibmwebspheremqclient01.crt -format ascii -pw changeit
  1. Remove certificate from keystore (using stashed password)
ikeycmd -cert -delete -label ibmwebspheremqclient01 -db "key.kdb" -stashed
  1. Set default certificate
ikeycmd -cert -setdefault -db key.kdb -label "mydefaultcertificate" -pw changeit