Skip to content

Instantly share code, notes, and snippets.

@harryyoud
Created July 14, 2017 10:31
Show Gist options
  • Select an option

  • Save harryyoud/b42aabc4b98d0f399d6b11160f0aa1a1 to your computer and use it in GitHub Desktop.

Select an option

Save harryyoud/b42aabc4b98d0f399d6b11160f0aa1a1 to your computer and use it in GitHub Desktop.
#!/bin/bash
for x in platform media shared; do
echo ${x}_key_release="$(openssl pkcs8 -in $x.pk8 -inform DER -outform PEM -nocrypt | openssl rsa -pubout | tail -n+2 | head -n-1 | tr -d '\n')"
echo ${x}_cert_release="$(openssl x509 -outform der -in $x.x509.pem | base16)"
done
echo release_key="$(openssl pkcs8 -in releasekey.pk8 -inform DER -outform PEM -nocrypt | openssl rsa -pubout | tail -n+2 | head -n-1 | tr -d '\n')"
echo release_cert="$(openssl x509 -outform der -in releasekey.x509.pem | base16)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment