Skip to content
Browse files

Added support for signing binaries

  • Loading branch information...
1 parent 3a517e4 commit f3731d8ce177ef2791ffb3ad41891fac2fcad52e @kintel kintel committed Feb 11, 2013
Showing with 20 additions and 3 deletions.
  1. +2 −0 Info.plist
  2. +1 −0 appcast-snapshots.xml.in
  3. +1 −0 appcast.xml.in
  4. +12 −0 dsa_pub.pem
  5. +1 −2 openscad.pro
  6. +3 −1 scripts/publish-macosx.sh
View
2 Info.plist
@@ -41,5 +41,7 @@
<true/>
<key>OSAScriptingDefinition</key>
<string>OpenSCAD.sdef</string>
+ <key>SUPublicDSAKeyFile</key>
+ <string>dsa_pub.pem</string>
</dict>
</plist>
View
1 appcast-snapshots.xml.in
@@ -11,6 +11,7 @@
<enclosure url="https://openscad.googlecode.com/files/OpenSCAD-@VERSION@.dmg"
sparkle:version="@VERSIONDATE@"
sparkle:shortVersionString="@VERSION@"
+ sparkle:dsaSignature="@DSASIGNATURE@"
length="@FILESIZE@"
type="application/octet-stream"/>
</item>
View
1 appcast.xml.in
@@ -11,6 +11,7 @@
<enclosure url="https://openscad.googlecode.com/files/OpenSCAD-@VERSION@.dmg"
sparkle:version="@VERSIONDATE@"
sparkle:shortVersionString="@VERSION@"
+ sparkle:dsaSignature="@DSASIGNATURE@"
length="@FILESIZE@"
type="application/octet-stream"/>
</item>
View
12 dsa_pub.pem
@@ -0,0 +1,12 @@
+-----BEGIN PUBLIC KEY-----
+MIIBtjCCASsGByqGSM44BAEwggEeAoGBAMP6y57wSCnUvfwehhit5K8EU4W3uf6s
+zCFUGWIxWaweWjkezHIZLz7pTv0dLm5Va0vKTIWgrNseTtdTaJ491lyGAHWlu9sP
+LAe/vG+UpIA6uNZX3gB7dDxunRUenTczYgnVoQWSIVRhZUEjci9WgbJJrguTPQvi
+cCfuI6Hox6cDAhUA3duJXWi3eaOIMqCfm6RpEt/fRC8CgYApHNQB5Ar/SIPobxtJ
+Ox05xhhgm/YOJbGUcSZjsMgEP6rj+269vCBnYG+eE3nelXfOA5SXbOfY6Ju6+RBS
+OdPeNbWZah88QJK8bqBH7KS/EkMaiEXerPEIEIC5xOjKjYXs1z8AtNGUGORwWwjm
+85et2nY/WXvIJkUQtET/bWEYPQOBhAACgYB7hBLdC5rXpV0nqEmI4QYYt63OdP4D
+Lf2XISyKi9H1F+6mwoeU4It7fMdGC1MBXyx/3sv8U1YbYIeDHB+lDy6QN2UxSBTN
+VI9UPUqdcoYZwQiaHHgqWcoyPDqzEVsFtHi3/pXLckuszA19NT8980o+7noiKxUm
+3pDa4C+oANPFCQ==
+-----END PUBLIC KEY-----
View
3 openscad.pro
@@ -66,7 +66,7 @@ macx {
ICON = icons/OpenSCAD.icns
QMAKE_INFO_PLIST = Info.plist
APP_RESOURCES.path = Contents/Resources
- APP_RESOURCES.files = OpenSCAD.sdef
+ APP_RESOURCES.files = OpenSCAD.sdef dsa_pub.pem
QMAKE_BUNDLE_DATA += APP_RESOURCES
LIBS += -framework Cocoa -framework Sparkle
}
@@ -323,7 +323,6 @@ macx {
src/EventFilter.h \
src/AutoUpdater.h \
src/SparkleAutoUpdater.h \
- src/CocoaInitializer.h \
src/CocoaUtils.h
SOURCES += src/AppleEvents.cc \
src/AutoUpdater.cc
View
4 scripts/publish-macosx.sh
@@ -32,13 +32,15 @@ if [[ $? != 0 ]]; then
exit 1
fi
+SIGNATURE=$(openssl dgst -sha1 -binary < OpenSCAD-$VERSION.dmg | openssl dgst -dss1 -sign dsa_priv.pem | openssl enc -base64)
+
if [[ $VERSION == $VERSIONDATE ]]; then
APPCASTFILE=appcast-snapshots.xml
else
APPCASTFILE=appcast.xml
fi
echo "Creating appcast $APPCASTFILE..."
-sed -e "s,@VERSION@,$VERSION,g" -e "s,@VERSIONDATE@,$VERSIONDATE,g" -e "s,@FILESIZE@,$(stat -f "%z" OpenSCAD-$VERSION.dmg),g" $APPCASTFILE.in > $APPCASTFILE
+sed -e "s,@VERSION@,$VERSION,g" -e "s,@VERSIONDATE@,$VERSIONDATE,g" -e "s,@DSASIGNATURE@,$SIGNATURE,g" -e "s,@FILESIZE@,$(stat -f "%z" OpenSCAD-$VERSION.dmg),g" $APPCASTFILE.in > $APPCASTFILE
cp $APPCASTFILE ../openscad.github.com
if [[ $VERSION == $VERSIONDATE ]]; then
cp $APPCASTFILE ../openscad.github.com/appcast-snapshots.xml

0 comments on commit f3731d8

Please sign in to comment.
Something went wrong with that request. Please try again.