What I found helpful so far in trying to use OpenSSL with VxWorks is the
examples in SSL\openssl-0.9.5\demos\ssl. Specifically serv.cpp. This seems to
be very bare bones and a good starting point. At least so far for me this has
worked great.
jennifer
[openssl.org]:openssl-users@PSC
05/23/2000 09:17 AM
To:
cc:
Subject: Win32 web server using ssl
My company wants me to integrate SSL into our custom web server. I already
asked for help with this back in March, and responses were very helpful. Have
been away from ssl working on another project, and now I am back, and
unfortunately still lost.
I've read through (or tried to anyways) the s_server code. While I am sure that
the answer is somewhere in there, I am not familiar with bios and have been
unable to extract the needed info from there.
I would like to add ssl support without using bios, just straight sockets (at
least that way i am working with something I understand).
So say my basic server looks something like this:
...
parent = socket(AF_INET, SOCK_STREAM, 0);
...
bind(parent, (struct sockaddr*)&serveraddr, sizeof(serveraddr));
...
listen(parent, 5);
while(1){
child = accept(parent, (struct sockaddr *) &clientaddr, &clientlen);
thread_id = _beginthread(process_conn, 0, (void *) &child);
}
...
process_conn then handles the newly accepted connection, and has this code:
void process_conn(void * ptr){
SOCKET sock = *(SOCKET*)ptr;
...
size = recv(sock, read_buffer, sizeof(read_buffer) - 1, 0);
...
send(sock, write_buffer, size, 0);
...
}
I assume that recv() needs to be replaced with SSL_read(), and send() with
SSL_write(). However I have no idea what needs to be done to initialize SSL,
and do the handshaking for the connection. At first I looked to the programs in
\demos but unfortunately the relevant ones seem to be written against an older
version of the API, and were only of marginal use.
I would greately appreciate any help with this matter.
Thanks
-Mike Sandler
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]
Mime.822