CLEANUP: ssl: make ssl_sock_generate_certificate() use ssl_sock_generated_cert_serial()

It saves from open-coding the hashing method. Instead all serial
generation is done in a single function.
This commit is contained in:
Willy Tarreau 2015-07-07 18:09:34 +02:00
parent 646b864fe5
commit fc017fec48

View File

@ -1159,7 +1159,7 @@ ssl_sock_generate_certificate(const char *servername, struct bind_conf *bind_con
struct lru64 *lru = NULL;
unsigned int serial;
serial = XXH32(servername, strlen(servername), ssl_ctx_lru_seed);
serial = ssl_sock_generated_cert_serial(servername, strlen(servername));
if (ssl_ctx_lru_tree) {
lru = lru64_get(serial, ssl_ctx_lru_tree, cacert, 0);
if (lru && lru->domain)