Skip to content

Instantly share code, notes, and snippets.

@obfusk
Created October 17, 2022 15:55
Show Gist options
  • Select an option

  • Save obfusk/81956cef6c5c5e62a8e243ad8d10cc3d to your computer and use it in GitHub Desktop.

Select an option

Save obfusk/81956cef6c5c5e62a8e243ad8d10cc3d to your computer and use it in GitHub Desktop.
get fingerprint of cert from jar
#!/bin/sh
unzip -p "${1:-index-v1.jar}" META-INF/"${2:-OBFUSK.RSA}" \
| openssl pkcs7 -print_certs -inform DER \
| openssl x509 -fingerprint -sha256 \
| head -n1 | cut -d= -f2 | tr -d :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment