![]() |
|
[C] OpenSSL upgrading connection to TLS - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C] OpenSSL upgrading connection to TLS (/showthread.php?tid=5825408) |
OpenSSL upgrading connection to TLS - Byte™ - Apr 15, 2018 All I want to do is connect to an SMTP server, talk to it and then request it to perform a handshake mid connection. How would I go about doing that? I believe it has something to do with creating a SSL_BIO and then pushing it onto original connection bio. Oversimplifed example of what I am trying to do. EDIT The code represents what I did to promote the bio to a secure connection. Code #include <openssl/bio.h>Edit I found the answer to my problem by reading some OpenSSL source code, what you can do is create a SSL_BIO with BIO_NEW_SSL and then append the BIO to the SSL_BIO and then call bio_do_handshake with the SSL_BIO. |