mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-30 15:21:04 +01:00
BUILD: ssl: avoid a warning about conn not used with OpenSSL < 1.0.1
Building with a version of openssl without heartbeat gives this since
latest 29f037d ("MEDIUM: ssl: explicitly log failed handshakes after a
heartbeat") :
src/ssl_sock.c: In function 'ssl_sock_msgcbk':
src/ssl_sock.c:188: warning: unused variable 'conn'
Simply declare conn inside the ifdef. No backport is needed.
This commit is contained in:
parent
6c09c2ceae
commit
84815006a0
@ -185,12 +185,11 @@ int ssl_sock_bind_verifycbk(int ok, X509_STORE_CTX *x_store)
|
|||||||
/* Callback is called for ssl protocol analyse */
|
/* Callback is called for ssl protocol analyse */
|
||||||
void ssl_sock_msgcbk(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)
|
void ssl_sock_msgcbk(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)
|
||||||
{
|
{
|
||||||
struct connection *conn = (struct connection *)SSL_get_app_data(ssl);
|
|
||||||
|
|
||||||
#ifdef TLS1_RT_HEARTBEAT
|
#ifdef TLS1_RT_HEARTBEAT
|
||||||
/* test heartbeat received (write_p is set to 0
|
/* test heartbeat received (write_p is set to 0
|
||||||
for a received record) */
|
for a received record) */
|
||||||
if ((content_type == TLS1_RT_HEARTBEAT) && (write_p == 0)) {
|
if ((content_type == TLS1_RT_HEARTBEAT) && (write_p == 0)) {
|
||||||
|
struct connection *conn = (struct connection *)SSL_get_app_data(ssl);
|
||||||
const unsigned char *p = buf;
|
const unsigned char *p = buf;
|
||||||
unsigned int payload;
|
unsigned int payload;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user