Transfer email and migrate accounts with YippieMove.

Archive

Posts Tagged ‘Guide’

Signing code (Authenticode) in OS X with a Thawte Certificate

July 16th, 2009

Just some quick notes on signing Windows executables using a Mac. First, get Mono:

Download mono

I used version 2.4. Next, take a look at Mozilla’s code signing guide and work around the problems you run into using Zillabit Notes on Mono Authenticode.

It boils down to something like this:

  • Open your Thawte issued .SPC file in Windows using certmgr (just double click it).
  • Expand the certificate view in the left pane and click on Certificates.
  • The components of your SPC file will be displayed, normally consisting of your company certificate and then some signer root certificates.
  • For each of the certificates, go to Action / All Tasks / Export... and export the certificate as a DER .cer file.
  • Bring the exported files to your Mac and join them with cert2spc. E.g.:
    cert2spc cert1.cer cert2.cer cert3.cer my_fixed_certificate.spc
  • Use the newly generated SPC file to sign your code:
    signcode -spc my_fixed_certificate.spc -v my_private_certificate_key.pvk -a sha1 -$ commercial -n MyProductName -i http://www.mycompany.com -t http://timestamp.verisign.com/scripts/timstamp.dll MyProgram.exe
  • Verify by trying to run the executable in Windows.

A final note: don’t try to verify the signing using mono’s chktrust command. At least for me it always tells me the exe doesn’t have a signature.

siker Site , , , ,

Installing symfony on OS X 10.4.

December 13th, 2006

Just a couple of quick notes.

  • Use ‘entropy-php’ to install the php module to run with Apache on your mac.
  • Rename /usr/bin/php to /usr/bin/php4 (This is important.)
  • Rename /usr/bin/pear to /usr/bin/pear13 (Even more important.)
  • Create a symbolic link so that the php5 pear can be used: ln /usr/local/php5/bin/pear /usr/bin/pear (Most important.)

If you don’t follow the last two steps you will get all kinds of funny errors with pear. Pear upgrade will refuse to upgrade you to pear 1.4 because it claims it’s missing pear 1.3 (which is funny because if pear isn’t installed, how can pear say anything? And why do you need an old version of pear to get a new version of pear?).

The most likely message you’ll see if you don’t do the last two steps is:

“Command ‘pear.symfony-project.com’ is not valid, try ‘pear help’”

when you try to add the Symfony channel.

From there on you can just proceed with the normal symfony installation stuff.

pear channel-discover pear.symfony-project.com
pear install symfony/symfony

All done.

siker Mac OS X

Battery Pack Doesn’t Want to Fit MacBook After Memory Upgrade

November 27th, 2006

I experienced this problem today. I bought a first generation MacBook (13″ 2.0 GHz Core Duo) for my brother. It came with 1GB of memory, but after playing around with a couple of programs I realized that was a little bit short. I was running a Windows XP in Parallels, and at the same time I had a Word document open, and a couple of browser windows. The machine almost came to a stop. Not that strange since Windows XP alone was using a couple of hundred MB of memory – maybe 400 MB. And Word running in Rosetta is a beast.

Anyhow, so I had 2GB of memory in my MacBook Pro and decided to swap a memory stick from the MacBook Pro with a stick from the MacBook. Then both machines would have 1.5 GB.

When you take out the battery pack from the MacBook you’ll find a little rail which you need to remove to get to the memory banks. Three tiny screws hold it in place, and it’s shaped like an L sort of. Here’s the thing: once I was done and I had put the memory in (marveling over the engineering making it possible to get to the memory hidden inside of the computer with the help of two cute little levers), I was unable to get the battery pack back in.

It just wouldn’t seem to fit anymore. When I tried to push the battery in it insisted on going towards the center of the computer instead of fitting snuggly. Anyhow to make a long story short it turns out I hadn’t put the L shaped rail back in place correctly. On the short leg of the L there is a little piece which needs to go into a little hole in the side of the battery compartment. Apparently I had missed that hole but since the L rail is made out of flexible metal it just bent a little and I didn’t realize it was put in wrong.

Solution was to use a little screwdriver to guide the little piece on the short leg into the little hole in the compartment wall. Then the battery fit great again and everything was A-ok.

Just writing this down to save people some time should you happen to come by this by place by Google or something. :)

siker Mac OS X