Sunday, July 12, 2020

openssl base64: tips for day by day

1. How to view the contents of a .pem cert:
$ openssl x509 -in FILE_NAME.pem -text -noout
$ keytool -printcert -file FILE_NAME.pem

2. Check TLS/SSL Of Website with Specifying Certificate Authority
$ openssl s_client -connect engine.medogz.home:443 -CAfile /etc/pki/ca-trust/source/anchors/ca.pem 

3. Using the new feature, partial_chain
$ openssl s_client -connect registry.medogz.home:443 -partial_chain
If specified, this validates if the truststore has any anchor, not just a root. 

4. Decode base64 encode:
$ base64 -d FILE_NAME

5. Encode PEM/key to base64
$ openssl base64 -in foobar.key -out foobar.base64

7. Verify a chain 
$ openssl verify -verbose -CAfile RootCert.pem Intermediate.pem
$ openssl verify -CAfile RootCert.pem -untrusted Intermediate.pem UserCert.pem

No comments:

Post a Comment