{
const char *ptr,*unroll,*risc,*size;
- init=0;
#ifdef DES_PTR
ptr="ptr";
#else
else
size="long";
sprintf(buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,size);
+ init=0;
}
return(buf);
}
if (init)
{
- init=0;
CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
/* put in some default random data, we need more than
* just this */
memset(md,0,MD_DIGEST_LENGTH);
#endif
CRYPTO_w_lock(CRYPTO_LOCK_RAND);
+ init=0;
}
st_idx=state_index;
#endif
-void ERR_load_X509V3_strings(void)
+void ERR_load_X509V3_strings()
{
static int init=1;
if (init)
{
- init=0;
memcpy((char *)&SSLv23_client_data,
(char *)sslv23_base_method(),sizeof(SSL_METHOD));
SSLv23_client_data.ssl_connect=ssl23_connect;
SSLv23_client_data.get_ssl_method=ssl23_get_client_method;
+ init=0;
}
return(&SSLv23_client_data);
}
if (init)
{
- init=0;
memcpy((char *)&SSLv23_data,(char *)sslv23_base_method(),
sizeof(SSL_METHOD));
SSLv23_data.ssl_connect=ssl23_connect;
SSLv23_data.ssl_accept=ssl23_accept;
SSLv23_data.get_ssl_method=ssl23_get_method;
+ init=0;
}
return(&SSLv23_data);
}
if (init)
{
- init=0;
memcpy((char *)&SSLv23_server_data,
(char *)sslv23_base_method(),sizeof(SSL_METHOD));
SSLv23_server_data.ssl_accept=ssl23_accept;
SSLv23_server_data.get_ssl_method=ssl23_get_server_method;
+ init=0;
}
return(&SSLv23_server_data);
}
if (init)
{
- init=0;
memcpy((char *)&SSLv2_client_data,(char *)sslv2_base_method(),
sizeof(SSL_METHOD));
SSLv2_client_data.ssl_connect=ssl2_connect;
SSLv2_client_data.get_ssl_method=ssl2_get_client_method;
+ init=0;
}
return(&SSLv2_client_data);
}
if (init)
{
- init=0;
+ CRYPTO_w_lock(CRYPTO_LOCK_SSL);
for (i=0; i<SSL2_NUM_CIPHERS; i++)
sorted[i]= &(ssl2_ciphers[i]);
qsort( (char *)sorted,
SSL2_NUM_CIPHERS,sizeof(SSL_CIPHER *),
FP_ICC ssl_cipher_ptr_id_cmp);
+
+ CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
+ init=0;
}
id=0x02000000L|((unsigned long)p[0]<<16L)|
if (init)
{
- init=0;
memcpy((char *)&SSLv2_data,(char *)sslv2_base_method(),
sizeof(SSL_METHOD));
SSLv2_data.ssl_connect=ssl2_connect;
SSLv2_data.ssl_accept=ssl2_accept;
SSLv2_data.get_ssl_method=ssl2_get_method;
+ init=0;
}
return(&SSLv2_data);
}
if (init)
{
- init=0;
memcpy((char *)&SSLv2_server_data,(char *)sslv2_base_method(),
sizeof(SSL_METHOD));
SSLv2_server_data.ssl_accept=ssl2_accept;
SSLv2_server_data.get_ssl_method=ssl2_get_server_method;
+ init=0;
}
return(&SSLv2_server_data);
}
if (init)
{
- init=0;
+ CRYPTO_w_lock(CRYPTO_LOCK_SSL);
for (i=0; i<SSL3_NUM_CIPHERS; i++)
sorted[i]= &(ssl3_ciphers[i]);
qsort( (char *)sorted,
SSL3_NUM_CIPHERS,sizeof(SSL_CIPHER *),
FP_ICC ssl_cipher_ptr_id_cmp);
+
+ CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
+
+ init=0;
}
id=0x03000000L|((unsigned long)p[0]<<8L)|(unsigned long)p[1];
if (init)
{
- init=0;
memcpy((char *)&SSLv3_data,(char *)sslv3_base_method(),
sizeof(SSL_METHOD));
SSLv3_data.ssl_connect=ssl3_connect;
SSLv3_data.ssl_accept=ssl3_accept;
SSLv3_data.get_ssl_method=ssl3_get_method;
+ init=0;
}
return(&SSLv3_data);
}
if (init)
{
- init=0;
memcpy((char *)&SSLv3_server_data,(char *)sslv3_base_method(),
sizeof(SSL_METHOD));
SSLv3_server_data.ssl_accept=ssl3_accept;
SSLv3_server_data.get_ssl_method=ssl3_get_server_method;
+ init=0;
}
return(&SSLv3_server_data);
}
if (init)
{
- init=0;
memcpy((char *)&TLSv1_client_data,(char *)tlsv1_base_method(),
sizeof(SSL_METHOD));
TLSv1_client_data.ssl_connect=ssl3_connect;
TLSv1_client_data.get_ssl_method=tls1_get_client_method;
+ init=0;
}
return(&TLSv1_client_data);
}
if (init)
{
- init=0;
memcpy((char *)&TLSv1_data,(char *)tlsv1_base_method(),
sizeof(SSL_METHOD));
TLSv1_data.ssl_connect=ssl3_connect;
TLSv1_data.ssl_accept=ssl3_accept;
TLSv1_data.get_ssl_method=tls1_get_method;
+ init=0;
}
return(&TLSv1_data);
}
if (init)
{
- init=0;
memcpy((char *)&TLSv1_server_data,(char *)tlsv1_base_method(),
sizeof(SSL_METHOD));
TLSv1_server_data.ssl_accept=ssl3_accept;
TLSv1_server_data.get_ssl_method=tls1_get_server_method;
+ init=0;
}
return(&TLSv1_server_data);
}