Hello All,
It seems there is a bug in ERR_load_SSL_strings()
function when called more than once. ERR_error_string() doesnot print the error
message.
This can be reproduced using the following sample
program.
====================================================
#include <openssl/err.h>
#include <openssl/ssl.h> int main()
{
ERR_load_SSL_strings();
printf("%s\n",ERR_error_string(336109761,NULL));
ERR_free_strings();
ERR_load_SSL_strings(); printf("%s\n",ERR_error_string(336109761,NULL)); ERR_free_strings();
return 0;
} ====================================================
# cc err.c -lcrypto -lssl
# ./a.out
error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher error:1408A0C1:lib(20):func(138):reason(193) This is because ERR_load_SSL_strings() sets a
static variable when it is called and it dooesnot unset this variable in
ERR_free_strings(). So any further call to ERR_load_SSL_strings() does nothing
and returns.
Please provide ur views on this. Thanks, Vijayalakshmi. |
- Problem with ERR_load_SSL_strings() Viji
- Re: Problem with ERR_load_SSL_strings() Kyle Hamilton