Reject unauthorized SSL connections

fixes #816