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.


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)

Please answer me ASAP.

Thanks
Rushi

_________________________________________________________________
Get the best astro advice. See what the stars hold in store. http://www.msn.co.in/Astrology/ Simply click here.


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

Reply via email to