Remove static to prevent race conditions

This commit is contained in:
z3APA3A 2017-10-18 17:07:12 +03:00
parent 286aa51e78
commit 2c0bc19f75

View File

@ -112,8 +112,8 @@ SSL_CERT ssl_copy_cert(SSL_CERT cert)
unsigned char p2[] = "3proxy";
unsigned char p3[] = "3proxy CA";
static char hash_name[sizeof(src_cert->sha1_hash)*2 + 1];
static char cache_name[200];
char hash_name[sizeof(src_cert->sha1_hash)*2 + 1];
char cache_name[200];
bin2hex(src_cert->sha1_hash, sizeof(src_cert->sha1_hash), hash_name, sizeof(hash_name));
sprintf(cache_name, "%s%s.pem", cert_path, hash_name);