[openssl.org #262] bug: init race in SSLv3_client_method
2002-09-01 17:01:02 GMT
In this method in ssl/s3_clnt.c, there's a race condition with the static
init variable that is causing a crash in my multithreaded program. init
gets set to 0 before the static structures have been set up. I believe a
lock is needed.
142 SSL_METHOD *SSLv3_client_method(void)
143 {
144 static int init=1;
145 static SSL_METHOD SSLv3_client_data;
146
147 if (init)
148 {
149 init=0;
150 memcpy((char *)&SSLv3_client_data,(char
*)sslv3_base_method(),
151 sizeof(SSL_METHOD));
152 SSLv3_client_data.ssl_connect=ssl3_connect;
153 SSLv3_client_data.get_ssl_method=ssl3_get_client_method;
154 }
155 return(&SSLv3_client_data);
156 }
Has anyone run into this before? What method does OpenSSL use to lock
access to data structures?
thanks,
patrick
______________________________________________________________________
(Continue reading)
> The error message suggested that index.txt has somehow had an invalid
> serial number written to it. What does you index.txt and your serial
> file look like when you get this message?
This is what I did after 'make install':
cd /usr/local/ssl
mkdir rootCA
[edited openssl.cnf and adjusted the paths accordingly]
cd rootCA
RSS Feed