Jeremy and others... 

Please assume that my function "SSL_Server_Socket" &
"client_socket_descriptor" (called below) has
SSL_library_init, SSL_CTX_new, SSL_new, SSL_set_fd. I
am able to convert a socket to a SSL_socket.... not
problem with that.

Porblme is... in my program I want to know if I have
to convert both server_socket and client_socket, to
SSL_server_socket & SSL_client_socket ??

Also, where to call SSL_accept()...? Should I pass
Server_SSL to it or Client_SSL as parameter.

My program is below... (bit modified to make it clear)

....
....
Create a socket "sock";
 
server_sock_descriptor = sock_listen();//In
"sock_listen()", 'bind' and 'select' is done

Create
SSL_Server_Socket(ssl,server_sock_descriptor);// made
server_scoket as an SSL_server_socket by calling
OpenSSL APIs
 
while (true)
{
  if (sock_select())
  {
    client_socket_descriptor = sock_accept();    

    // Should client socket must also be an SSL
socket??
    //If 'yes' then I will simply call- create
SSL_Client_Socket(SSL_client,client_sock_descriptor);
 
     /// 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.
  }
}
....
....




Thanks a lot! 
- Ruby




--- Ruby Cruiser <[EMAIL PROTECTED]> wrote:
> 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 a socket "sock";
> 
> server_socket_descriptor = sock_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]


__________________________________________________
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