Serge wrote:
So far, I have tried with ssl functions, then with BIO functions but without success. I have search an answer or documents explaining how to do that but not found.
Here's what I do with ssl:
SSL *ssl;
SSL_CTX *ctx;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
char reply[1024];
SOCKET Socket;
int read;
SSL_library_init();
SSL_METHOD* method = SSLv23_client_method();
ctx = SSL_CTX_new(method);
ssl = SSL_new(ctx);
// this is my own function that use windows socket
Socket = HttpConnect ("smtp.gmail.com", 25);
Have you already tried to connect to port 465? To use SSL on port 25 you'll have to follow the TLS protocol, which needs some communication via the insecure channel. Also make sure that HttpConnect does not try to initiate any handshake.
// have tried to connect to google.com without success too!
// Socket = HttpConnect ("www.google.com <http://www.google.com>", 80);
read = SSL_set_fd(ssl, Socket);
// connect always return -1, so I did not go further
read = SSL_connect(ssl);
[...]
Kind regards, Ted ;) ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]