Hi!!!

My company has a web server which is actaully
implemented using the concept of sockets (socket
program...). I am adding OpenSSL to it.

With the OpenSSL help and refering to your link
http://members.netscapeonline.co.uk/jeremyalansmith/ssltutorial/
,

Firstly, I followed the steps in creating the private
key and the certificate. It was sucessful. 

Second step was also sucessful, that is "Initialising
the SSL Socket".

However, for implementing 3rd step "Using the SSL
Socket", I've few doubts... please clarify!

My program (simple web server) looks like this...

...
...
Create socket "sock";

server_socket_descriptor = socket_listen(); //In
"socket_listen()", 'bind' and 'select' is done

Create SSL_Server_Socket(ssl,
server_socket_descriptor); // made server_scoket as an
SSL_server_socket

/// line_mark1

while (true)
{
  if (socket_select())
  {
    client_socket_descriptor = socket_accept();    

    // should I call SSL functions here also to make
the client socket as SSL??
    // Should both client and server socket must be
SSL_sockets??

    /// line_mark2

    new_web_page(client_socket_descriptor);

    new_thread(new_web_page); // create a thread
(which does read & write of HTTP/HTML) and goes back
to listen.

  }
}
....
....



Also in the above program, where do I call
SSL_accept() & SSL_connect??

I tried to call SSL_accept() putting them in
"line_mark1/2" respectivly but it results false
(error:00000005::lib(0) :func(0) :bad asn1 object
header).

Anyone, please help me understand!!!! Thank you.




--- Jeremy Smith
<[EMAIL PROTECTED]> wrote:
> Hi!
> 
> I've setup a page about how to get an SSL socket
> working, from the webserver
> side of things and on virtually any browser (well,
> Netscape 2+ and IE3+ I
> think). Should be okay for non-Windows users
> (although Windows is the
> platform I got it working on), it's a step-by-step
> guide.
> 
>
http://members.netscapeonline.co.uk/jeremyalansmith/ssltutorial/
> 
> I hope it's okay putting the LIB and DLL files
> there.
> 
> It's C-oriented, and all the code you need is in
> <pre>, so it should be in
> Courier font on your browser.
> 
> Hope this helps someone, please give me feedback.
> 
> Cheers,
> 
> Jeremy.
> 
>
______________________________________________________________________
> OpenSSL Project                                
> http://www.openssl.org
> User Support Mailing List                   
> [EMAIL PROTECTED]
> Automated List Manager                          
[EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to