XP-Install (xpi) code signing.
easy_install -Z M2Crypto
Use pip (or easy_install or whatever):
pip install https://github.com/nmaier/xpisign.py/zipball/master
Or a particular version (tag):
pip install https://github.com/nmaier/xpisign.py/zipball/<version>
xpisign -k cert.pem addon.xpi addon.signed.xpi
xpisign --help
Also see the Wiki for more information, articles and how-tos.
Thanks to Wladimir Palant for initially researching this stuff!