From: Willy Tarreau Date: Wed, 17 Jul 2019 09:29:32 +0000 (+0200) Subject: MINOR: ssl: switch to conn_get_dst() to retrieve the destination address X-Git-Tag: v2.1-dev2~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5bdb64d35835bae91f25948a3c2cfd6076a0ee0;p=thirdparty%2Fhaproxy.git MINOR: ssl: switch to conn_get_dst() to retrieve the destination address This replaces conn_get_to_addr() and the subsequent check. --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 62b85d1431..9b53a917f3 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -2083,8 +2083,7 @@ ssl_sock_generate_certificate_from_conn(struct bind_conf *bind_conf, SSL *ssl) unsigned int key; struct connection *conn = SSL_get_ex_data(ssl, ssl_app_data_index); - conn_get_to_addr(conn); - if (conn->flags & CO_FL_ADDR_TO_SET) { + if (conn_get_dst(conn)) { key = ssl_sock_generated_cert_key(&conn->addr.to, get_addr_len(&conn->addr.to)); if (ssl_sock_assign_generated_cert(key, bind_conf, ssl)) return 1;