Archived Forum Post

Index of archived forum posts


Implement SSL/TLS handshake for STARTTLS on Server-Side?

Sep 30 '14 at 08:36

I am using Chilkat to receive forwarded emails from an SMTP server. Basically, I am using the socket classes to act as an SMTP server and then doing something other than emailing with the received messages. I was wondering if you have any example code for the TLS/SSL handshake from a server-side. I am trying to handle the STARTTLS command but I am not sure how to do so. It appears that I can do this with the CkSocket class (C++). Could you provide any guidance?


Implementing the SSL handshake would be a huge endeavor and it's not something you would do directly. You would let the CkSocket class do it for you by calling ConvertToSsl after receiving the STARTTLS command. You must make sure to call CkSocket::InitSslServer to provide the server-side certificate beforehand.