Hi
Thanks to reply.
Friend i am compiling the code which generated by openssl (/demo directory).
Do u have any ready code or (open source) through which i can fulfill my needs.


I am trying to generating a SSL proxy server which can able to dump the data send by server to his client.
The application run on client side.
If the code is for win2K is more preferable.


Thanks
Rushi

From: Amar Desai <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: error compiling/running ssl server
Date: Tue, 16 Dec 2003 13:10:56 +0100



rushikesh joshi wrote:

Hi OpenSSL Support Team

Hi, I am heaving some problem on creating server.
Firstofall jsut tell me which OS is best to run the OpenSSL.
I have configured OpenSSL both in Win2000 And Linux7.
In both OS on creating the server i am facing the problem.

Linux Side (Programing language Perl)
-------------------------------------

    I have successfully install the openssl on my Redhet linux7 System.
    I also able to run "SSL Server" and "SSL Client" on same.
    All is going fine but i am having problem on ssl_server.pl file.

    Code:
    #SSL Server Data receive loop
    while (1) {
      warn "waiting for next connection.\n";

      while(($s = $sock->accept())) {
          my ($peer_cert, $subject_name, $issuer_name, $date, $str);

          if( ! $s ) {
       warn "error: ", $sock->errstr, "\n";
       next;
          }

warn "connection opened ($s).\n";

          if( ref($sock) eq "IO::Socket::SSL") {
       $subject_name = $s->peer_certificate("subject");
       $issuer_name = $s->peer_certificate("issuer");
          }

          warn "\t subject: '$subject_name'.\n";
          warn "\t issuer: '$issuer_name'.\n";

#My change code *******************************

          $temp_off=1;
          $temp_off=1;
          while ($s->peek($temp_r,75,$temp_off))
     {
      warn "\n waiting for data. \n";
      print "\n Incomming Message: ";
      print $temp_r; #This line print incoming data
      #$temp_r="";
      #print "\n Length:  $temp_size  \t Offset: $temp_off";
      $temp_off=$temp_off+length($temp_r);
     }
          #End my change code ***************************

          my $date = localtime();
          print $s "my date command says it's: '$date'";
          close($s);
          warn "\t connection closed.\n";
      }
    }
    #End SSL Server Data Receive Loop

    Problem:
     I have a problem that when my ssl_server's socket receive the data
    from client the data displays but
     in that while loop just it while loop it just goingon and cant break
    from that loop.

     I know there is only some logical error in my code. I aslo set the
    increment of OffSet by the size of
     data but no any result come.

     See above code the Print $temp_r function print the received data.
     after once data received the cursor doesn't break the loop.

I don't know weather i have to use the thread or some else.

Any idea or small code/tips how to write server.


Try to look and understand the code in s_server.c and s_client.c, which come with openssl.




Win 2000 Server Side (Programing Language VS6.0) -----------------------------------------


I have successfully compiled and created OpenSLL in my Win2000 system. Now to create SSL Server. i jsut open serv.c file in my MSVC6.0 Env. and compile it. And i receive few errors which like,

c:\perl\site\lib\tk\ptk\lang.h(283) : error C2040: 'Var' : 'struct Var
*' differs in levels of indirection from 'struct Var'
c:\perl\site\lib\tk\ptk\lang.h(1676) : error C2040: 'LangCallback' :
'struct LangCallback *' differs in levels of indirection from 'struct
LangCallback'
c:\perl\site\lib\tk\ptk\compat\unistd.h(42) : error C2061: syntax
error : identifier 'uid_t'
c:\perl\site\lib\tk\ptk\compat\unistd.h(52) : error C2146: syntax
error : missing ';' before identifier 'fork'
c:\perl\site\lib\tk\ptk\compat\unistd.h(52) : fatal error C1004:
unexpected end of file found

I have goto the lines of that erros but not able to figureout what to
do.
I think this code is not ready to use.
Any help.


One more question is If openssl open the send-recv data then if my own creating Proxy Server is work on it
OR It can able to dump this decrypted data. (My Proxy server able to dump the data but in encrypted form)


Is there any nice code sample available that i can solve my problem.(ANY OS)


http://www.rtfm.com/sslbook/ this might help you.

-Amar

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

_________________________________________________________________
R K Laxman fan? Get the best of his cartoons. http://server1.msn.co.in/sp03/gprs/howcani_cartoons.asp Now on your mobile.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to