Added support for client SSL certificates for https

Thanks almer-fuel for the inital patch!