17 |
17 |
#include "connection.h"
|
18 |
18 |
#include "path_util.h"
|
19 |
19 |
|
|
20 |
#pragma GCC diagnostic push
|
|
21 |
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
20 |
22 |
extern int errno;
|
|
23 |
#pragma GCC diagnostic pop
|
21 |
24 |
#ifdef HAVE_LIBSSL
|
22 |
25 |
static int ssl_initialized = 0;
|
23 |
26 |
static SSL_CTX *sslctx = NULL;
|
... | ... | |
1183 |
1186 |
return 0;
|
1184 |
1187 |
}
|
1185 |
1188 |
|
|
1189 |
// SSL crap: passing argument 3 of ‘SSL_CTX_ctrl’ with different width due to prototype
|
|
1190 |
#pragma GCC diagnostic push
|
|
1191 |
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
|
1186 |
1192 |
ret = SSL_CTX_set_tmp_dh(ctx, dh);
|
|
1193 |
#pragma GCC diagnostic pop
|
1187 |
1194 |
DH_free(dh);
|
1188 |
1195 |
|
1189 |
1196 |
if (ret != 1) {
|
... | ... | |
1323 |
1330 |
SSL_CTX *ctx;
|
1324 |
1331 |
|
1325 |
1332 |
if (!ssl_initialized) {
|
|
1333 |
// SSL crap: passing argument 1 of ‘OPENSSL_init_ssl’ with different width due to prototype
|
|
1334 |
#pragma GCC diagnostic push
|
|
1335 |
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
|
1326 |
1336 |
SSL_library_init();
|
|
1337 |
#pragma GCC diagnostic pop
|
1327 |
1338 |
SSL_load_error_strings();
|
1328 |
1339 |
errbio = BIO_new_fp(conf_global_log_file, BIO_NOCLOSE);
|
1329 |
1340 |
|
... | ... | |
1371 |
1382 |
ERR_print_errors(errbio);
|
1372 |
1383 |
return NULL;
|
1373 |
1384 |
}
|
|
1385 |
#pragma GCC diagnostic push
|
|
1386 |
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
|
|
1387 |
// SSL crap: passing argument 3 of ‘SSL_CTX_ctrl’ with different width due to prototype
|
1374 |
1388 |
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_BOTH);
|
1375 |
1389 |
SSL_CTX_set_timeout(ctx, (long)60);
|
|
1390 |
// SSL crap: passing argument 2 of ‘SSL_CTX_set_options’ with different width due to prototype
|
1376 |
1391 |
SSL_CTX_set_options(ctx, SSL_OP_ALL);
|
|
1392 |
#pragma GCC diagnostic pop
|
1377 |
1393 |
if (ciphers && !SSL_CTX_set_cipher_list(ctx, ciphers)) {
|
1378 |
1394 |
SSL_CTX_free(ctx);
|
1379 |
1395 |
return NULL;
|
... | ... | |
1798 |
1814 |
return 0;
|
1799 |
1815 |
}
|
1800 |
1816 |
|
|
1817 |
// ntohs() expects uint16_t, while sockaddr_in.sin_port is an in_port_t...
|
|
1818 |
#pragma GCC diagnostic push
|
|
1819 |
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
|
1801 |
1820 |
return ntohs(addr.sin_port);
|
|
1821 |
#pragma GCC diagnostic pop
|
1802 |
1822 |
}
|
1803 |
1823 |
|
1804 |
1824 |
uint16_t connection_remoteport(connection_t *cn)
|
... | ... | |
1818 |
1838 |
return 0;
|
1819 |
1839 |
}
|
1820 |
1840 |
|
|
1841 |
// ntohs() expects uint16_t, while sockaddr_in.sin_port is an in_port_t...
|
|
1842 |
#pragma GCC diagnostic push
|
|
1843 |
#pragma GCC diagnostic ignored "-Wtraditional-conversion"
|
1821 |
1844 |
return ntohs(addr.sin_port);
|
|
1845 |
#pragma GCC diagnostic pop
|
1822 |
1846 |
}
|
1823 |
1847 |
|
1824 |
1848 |
static char *socket_ip(int fd, int remote)
|