Implemented option to accept self-signed certificates.