Skip to content

Instantly share code, notes, and snippets.

@bertrandmartel
Last active August 29, 2015 14:27
Show Gist options
  • Save bertrandmartel/a59223b0756afa0b13bc to your computer and use it in GitHub Desktop.
Save bertrandmartel/a59223b0756afa0b13bc to your computer and use it in GitHub Desktop.
[ OPENSSL - ANDROID ] display public key of PKCS 7 certificate
#!/bin/bash
if [ -z $1 ]; then
echo "Error CERT.RSA in input"
exit -1
fi
echo -ne "\x1B[01;93m"
openssl pkcs7 -in CERT.RSA -inform DER -print_certs | openssl x509 -noout -pubkey
echo -ne "\x1B[0m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment