Last active
July 27, 2021 12:24
-
-
Save cmbuckley/8d4e48e4ac924fe13f505c580e34fd69 to your computer and use it in GitHub Desktop.
Verify Adobe AIR code signing certificate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ./air-cert-dates.sh /path/to/app.air | |
signatures="$(unzip -p "$1" META-INF/signatures.xml)" | |
xpath '//Signature[@Id="PackageSignature"]//X509Certificate[1]/text()' <<< "$signatures" 2>/dev/null \ | |
| sed -e $'1s/^/-----BEGIN CERTIFICATE-----\\\n/;$s/$/\\\n-----END CERTIFICATE-----/' \ | |
| openssl x509 -dates -noout \ | |
| sed -e $'1s/^/metric,date\\\n/;s/=/,/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ./verify-air-cert.sh /path/to/app.air | |
[ -e "$1/Contents" ] \ | |
&& signatures="$(cat "$1/Contents/Resources/META-INF/signatures.xml")" \ | |
|| signatures="$(unzip -p "$1" META-INF/signatures.xml)" | |
xpath '//Signature[@Id="PackageSignature"]//X509Certificate[1]/text()' <<< "$signatures" 2>/dev/null \ | |
| sed -e $'1s/^/-----BEGIN CERTIFICATE-----\\\n/;$s/$/\\\n-----END CERTIFICATE-----/' \ | |
| openssl x509 -text -noout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment