Tests: Add test for server-side ssl.
Bugfix: Keep refernce to ssl context in ClientAgent.