I'm trying to use Poco with openSSL on Windows 7 without success for secure client - server communication. I added the certificate that I received by using openssl console tool for the communication into cacert.pem. Before this when running the program it asked via console to accept the certificate. If I responded yes, program waited for a while and then throw exception.

Now when running the program, no console prompt to accept certificate, but still I do not get response from the server site and then after a while (around 60sec) Poco::Net::SSLConnectionUnexpectedlyClosedException is thrown. So what is the problem ?

I'm not familiar with certificate issues, openSSL configuration or SSL so any help is appreciated. The code below: