How to convert an SSL certificate to different formats

stackoverflow

iOS requires der encoded certificate -

openssl x509 -outform der -in certificate.pem -out certificate.der

OR

openssl x509 -outform der -in certificate.crt -out certificate.der

How to get SPKI Fingerprint of a server’s SSL certificate

echo "Q" | openssl s_client -connect $1 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64

where

$1 is the serverHostName:port e.g. api-uat2.usher.com:9500