Switch to SSL and add SHA1 checking

Fixes #27