CLEANUP: ssl: make ssl_sock_generated_cert_serial() take a const

It doesn't modify the input.
This commit is contained in:
Willy Tarreau 2015-07-07 18:09:15 +02:00
parent f67214554c
commit 646b864fe5
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ int ssl_sock_load_global_dh_param_from_file(const char *filename);
SSL_CTX *ssl_sock_create_cert(const char *servername, unsigned int serial, X509 *cacert, EVP_PKEY *capkey);
SSL_CTX *ssl_sock_get_generated_cert(unsigned int serial, X509 *cacert);
void ssl_sock_set_generated_cert(SSL_CTX *ctx, unsigned int serial, X509 *cacert);
unsigned int ssl_sock_generated_cert_serial(void *data, size_t len);
unsigned int ssl_sock_generated_cert_serial(const void *data, size_t len);
#endif /* _PROTO_SSL_SOCK_H */

View File

@ -1145,7 +1145,7 @@ ssl_sock_set_generated_cert(SSL_CTX *ssl_ctx, unsigned int serial, X509 *cacert)
/* Compute the serial that will be used to create/set/get a certificate. */
unsigned int
ssl_sock_generated_cert_serial(void *data, size_t len)
ssl_sock_generated_cert_serial(const void *data, size_t len)
{
return XXH32(data, len, ssl_ctx_lru_seed);
}