PHP OpenID server working - barely
Just managed to get the PHP OpenID server code I've been hacking on over the last couple of days to the point where I can post a comment on Mart's OpenID-authenticated guestbook. Woohoo!
My code punts on the "heavy lifting", just calling out to /usr/bin/openssl
to do all the crypto. Brad posted some details on how to do DSA digests directly in PHP, which could make this truly worthwhile. Hmm. How much do I value my sleep?
Update: Looks like someone else has got OpenID working in PHP too. Here is his ID server, which lets you register yourself, and will act as your server if you want it to. Progress!
Update 2: I've ported the important bits of dumpasn1
to PHP, which means I can now read a PEM file ("----BEGIN PUBLIC KEY-----" and a base64-encoded key) and pull out the four values that are relevant to DSS: p, q, g and y, whatever that means. The TypeKey DSS digest verification code that Brad referenced in his e-mail (linked above) seems to require p, q and g. It's getting late, but perhaps I'll be able to plug all the bits together tomorrow...