Crypt::Rijndael now works on Solaris

brian_d_foy on 2007-10-16T17:21:12

It's looks like I've solved the Crypt::Rijndael problems thanks to a patch from djberg96. It looks like some systems had an integer overflow problem with:

0xff << 24


So djberg96 changed that to use an unsigned int by attaching the U to the end of the number. I think I used to know that.

0xffU << 24


Additionally, I cast some return values from the XS stuff to (UINT *) to ensure that everything treated them as unsigned ints.

I hadn't been able to play with Solaris since Sourceforge's compile farm went away, but after elwarren suggested finding a QEMU image of Solaris and a bit of googling on that, I remembered that somewhere on my bookshelf I had Solaris 10 media from their initial offer when they made it open source. It was still shrink-wrapped even. It took me a day to install that because I actually did it three times before I realized that even though I installed the 32-bit version, Solaris was assuming it was 64-bit at boot time, causing panics. I have to fiddle with the VMware image by editing a file in the Mac OS X package (control click on the package, choose "Show Package Contents"). I found the .vmx file and added:

monitor_control.disable_longmode = 1


After that I had a bootable and fully useable Solaris 10. I spent half a day installing almost everything from Sunfreeware.com while I added a minicpan.

Two days after I started, I was able to fetch Crypt-Rijndael-1.04_03, run a clean make with no warnings, and then run the tests with the latest RT test cases passing.

Now I have a decent Solaris 10 virtual machine on which I can test things. It's on an external disk, so I can bring it to conferences to share with anyone who wants it. Anyone got anything good to trade? :)