Implement WS SSL.

Lots of unit tests this time.