I thought we'd already established this as a bug?

When a state is changed, the marker of the state needs to change, as
well.  The fact that freeing the strings doesn't clear the "loaded"
flag is... well, overlooking something obvious.

On 3/29/06, Viji <[EMAIL PROTECTED]> wrote:
>
> 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.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to