Merge pull request #307 from ariddell/master

Use openssl to verify the certificate