Openssl

Testing HTTPS with openssl

` $ openssl s_client -connect localhost:443 CONNECTED(00000003) …lots of certificate-related stuff here… GET / HTTP/1.0 HTTP/1.1 200 OK Date: Mon, 04 Feb 2008 09:19:01 GMT Server: Apache/2.2.7 (Unix) mod_ssl/2.2.7 OpenSSL/0.9.7l DAV/2 mod_python/3.3.1 Python/2.5.1 Last-Modified: Sat, 20 Nov 2004 20:16:24 GMT Accept-Ranges: bytes Content-Length: 44 Connection: close Content-Type: text/html It works! Connection closed by foreign host. ` Thanks to http://blog.yimingliu.com/ for posting this… http://blog.yimingliu.com/2008/02/04/testing-https-with-openssl/

converting ssl cert from PKCS#12 to PEM

$ openssl pkcs12 -in /path/to/my/cert.p12 -out /pathto/my/cert.pem If you get “X509_check_private_key:key values mismatch” e.g. with stunnel, then try adding -clcerts $ openssl pkcs12 -clcerts -in /path/to/my/cert.p12 -out /pathto/my/cert.pem

subversion/ssl with client certs stopped working?

There’s a bug in (at least some versions of) Ubuntu, which means the wrong library is being picked up. https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/294648 Workaround: LD_PRELOAD=/usr/lib/libneon.so.27 svn