Hi Henrik,

I'm not sure whether you've already solved your problem . If not check out my response.

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

long err;
if(nError> 0) {
   while((err=ERR_get_error())!=0)
      printf("%s     %s     %s \n", ERR_lib_error_string (err),
                       ERR_func_error_string (err),
                       ERR_reason_error_string (err));
}
You should pass the long error code you get from ERR_get_error() to

ERR_error_string(err, str) and not nError.

Try this. SSL_get_error returns very few error codes , in your case it is SSL_ERROR_SYSCALL.
The above code snippet will print the errors in the error queue in a readable form.


Let me know whether it helped.

-Krithiga




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

Reply via email to