ssl fix self-singed certificate acceptation

I had an issue similar to #168. This solved my problem. BTW nice work:)