3

I have built Poco 1.11 and am unable to get secure SMTP connections, or HTTPS connections in general, to work, with the NetSSL_Win module (i.e. using Windows Schannel rather than OpenSSL). There is a sample in the distribution at NetSSL_Win\samples\Mail\src :

        SecureSMTPClientSession session(mailhost);
        session.login();
        session.startTLS(pContext);
        if ( !username.empty() )
        {
            session.login(SMTPClientSession::AUTH_LOGIN, username, password);
        }
        session.sendMessage(message);
        session.close();

When I run it, the second login() call, after the startTLS() call, throws this error:

SSL Exception: Failed to decode data: The specified data could not be decrypted

The server in this case was smtp.gmail.com, on port 587.

I get the same error message for any other HTTPS client code I try to run as well.

Is anyone successfully using Poco 1.11 for HTTPS connections, using Windows Schannel?

cloudplay
  • 61
  • 2

0 Answers0