Skip to content

Instantly share code, notes, and snippets.

@dzeikei
Last active November 24, 2020 10:36
Show Gist options
  • Save dzeikei/6006236 to your computer and use it in GitHub Desktop.
Save dzeikei/6006236 to your computer and use it in GitHub Desktop.
Verify Google Play In-app billing receipt in command line using OpenSSL
# Convert base64 string from Google to a pem file
openssl enc -base64 -d -in publickey.base64 -A | openssl rsa -inform DER -pubin > public.pem
# Decode base64 signature to binary
openssl base64 -d -A -in signature.txt -out signature.sha1
# Verify signature
openssl dgst -sha1 -verify public.pem -signature signature.sha1 receipt.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment