Created
January 18, 2013 01:41
-
-
Save omarstreak/4561601 to your computer and use it in GitHub Desktop.
Create and sign your safari extension file
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
XAR=path/to/xar/bin | |
BUILD_DIR=path/to/dir/with/cert/files | |
EXTENSION=your extension name | |
$XAR -czf $EXTENSION.safariextz --distribution $EXTENSION.safariextension | |
$XAR --sign -f $EXTENSION.safariextz --digestinfo-to-sign digest.dat --sig-size `cat $BUILD_DIR/size.txt` --cert-loc $BUILD_DIR/cert.der --cert-loc $BUILD_DIR/cert01 --cert-loc $BUILD_DIR/cert02 | |
openssl rsautl -sign -inkey $BUILD_DIR/key.pem -in digest.dat -out sig.dat | |
$XAR --inject-sig sig.dat -f $EXTENSION.safariextz | |
rm -f sig.dat digest.dat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment