Support for HTTPs, verifies certificate against CA certs directory

Hello, I needed HTTPs support for my JSON checks and have built a basic HTTPs support together. It is basic and only supports directories with CA certificates - one could add support for ca_file too. I'd happily improve my patch to get it merged :) Thanks!