merged ssl with master. Made a nicer testsuite, and improved robustness in general