Henrik...sorry for addressing the reply to you though the questioner was Sunil:-).
- Krithiga

Henrik Nordstrom wrote:
On Sun, 10 Aug 2003, Sunil Ashok Rashinkar wrote:

  
Hi Henrik Nordstrom,
    

There is more people than only me in this list.. I am probably not at all
the most qualified for this question.

  
SSL_write(sslConnection, data + bytesTransmitted, bytesToSend);
This SSL_write fucntion fails and returns 5 as error code.
Error code is retrieved by --> nError = SSL_get_error(sslConnection,
bytesSent);
Error string is retrieved by --> ERR_error_string(nError, str);
Erro string which i get is --> error:00000005::lib(0) :func(0) : bad asn1
object header
    

I am guessing wildly here, but perhaps some non-SSL data was received from 
the other end of the connection? Or maybe the error occured earlier during 
SSL_connect/accept?

Have you tried OpenSSL PROG FAQ 5: I've called 'some function' and it 
fails, why? <url:http://www.openssl.org/support/faq.html#PROG5>. Maybe 
this gives a better description of the error(s) which may have occured.

  
I also read your friends comments regarding solution of this problem, which
said...
    
char buf[20];
RAND_seed(&buf,sizeof buf) ;
      
He did the above change in the code and got it working.
    

No idea.. if it was shortage of randomness you should get another error I 
think. At least I did when I was short of randomness/entropy in one of my 
applications.

In any case the above two lines is a terribly bad randomness seeding
method giving a false sense of randomness entropy information to OpenSSL,
quite likely degrading the cryptographic security of OpenSSL considerably.

If you have a windows application then you should probably be using
RAND_window() from the main event loop. I am not a Windows programmer so I
am of limited help on how to do this. The platforms I develop on all have
/dev/urandom which makes life with randomness requirements considerably
easier.

Regards
Henrik

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

  

Reply via email to