Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 695630
Collapse All | Expand All

(-)a/openssl-dtls.c (-3 / +1 lines)
Lines 315-321 static unsigned int psk_callback(SSL *ssl, const char *hint, char *identity, Link Here
315
315
316
#endif
316
#endif
317
317
318
#if OPENSSL_VERSION_NUMBER < 0x10002000L
318
#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
319
static const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr)
319
static const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr)
320
{
320
{
321
    return ssl->method->get_cipher_by_char(ptr);
321
    return ssl->method->get_cipher_by_char(ptr);
322
- 
323
--
324
openssl-esp.c         |  5 ++++-
322
openssl-esp.c         |  5 ++++-
325
tests/bad_dtls_test.c | 10 ++++++++--
323
tests/bad_dtls_test.c | 10 ++++++++--
326
2 files changed, 12 insertions(+), 3 deletions(-)
324
2 files changed, 12 insertions(+), 3 deletions(-)
(-)a/openssl-esp.c (-1 / +4 lines)
Lines 36-42 Link Here
36
				    HMAC_CTX_cleanup(c);	\
36
				    HMAC_CTX_cleanup(c);	\
37
				    free(c); } while (0)
37
				    free(c); } while (0)
38
38
39
static inline HMAC_CTX *HMAC_CTX_new(void)
39
#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
40
static
41
#endif
42
inline HMAC_CTX *HMAC_CTX_new(void)
40
{
43
{
41
	HMAC_CTX *ret = malloc(sizeof(*ret));
44
	HMAC_CTX *ret = malloc(sizeof(*ret));
42
	if (ret)
45
	if (ret)
(-)a/tests/bad_dtls_test.c (-4 / +8 lines)
Lines 291-302 static EVP_MD_CTX *handshake_md5; Link Here
291
static EVP_MD_CTX *handshake_sha1;
291
static EVP_MD_CTX *handshake_sha1;
292
292
293
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
293
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
294
static inline HMAC_CTX *HMAC_CTX_new(void) {
294
#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
295
static
296
#endif
297
inline HMAC_CTX *HMAC_CTX_new(void) {
295
    HMAC_CTX *ret = malloc(sizeof(*ret));
298
    HMAC_CTX *ret = malloc(sizeof(*ret));
296
    HMAC_CTX_init(ret);
299
    HMAC_CTX_init(ret);
297
    return ret;
300
    return ret;
298
}
301
}
299
static inline void HMAC_CTX_free(HMAC_CTX *ctx) {
302
#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
303
static
304
#endif
305
inline void HMAC_CTX_free(HMAC_CTX *ctx) {
300
    HMAC_CTX_cleanup(ctx);
306
    HMAC_CTX_cleanup(ctx);
301
    free(ctx);
307
    free(ctx);
302
}
308
}
303
- 
304
 error: 'DTLS1_2_VERSION' undeclared
309
 error: 'DTLS1_2_VERSION' undeclared
305
--
306
cstp.c         | 2 +-
310
cstp.c         | 2 +-
307
library.c      | 2 +-
311
library.c      | 2 +-
308
main.c         | 4 ++--
312
main.c         | 4 ++--
309
openssl-dtls.c | 2 +-
313
openssl-dtls.c | 2 +-
310
4 files changed, 5 insertions(+), 5 deletions(-)
314
4 files changed, 5 insertions(+), 5 deletions(-)
(-)a/cstp.c (-1 / +1 lines)
Lines 264-270 static int start_cstp_connection(struct openconnect_info *vpninfo) Link Here
264
			       vpninfo->disable_ipv6 ? "IPv4" : "IPv6,IPv4");
264
			       vpninfo->disable_ipv6 ? "IPv4" : "IPv6,IPv4");
265
	if (!vpninfo->disable_ipv6)
265
	if (!vpninfo->disable_ipv6)
266
		buf_append(reqbuf, "X-CSTP-Full-IPv6-Capability: true\r\n");
266
		buf_append(reqbuf, "X-CSTP-Full-IPv6-Capability: true\r\n");
267
#ifdef HAVE_DTLS
267
#if defined(HAVE_DTLS) && !defined(LIBRESSL_VERSION_NUMBER)
268
	if (vpninfo->dtls_state != DTLS_DISABLED) {
268
	if (vpninfo->dtls_state != DTLS_DISABLED) {
269
		/* The X-DTLS-Master-Secret is only used for the legacy protocol negotation
269
		/* The X-DTLS-Master-Secret is only used for the legacy protocol negotation
270
		 * which required the client to send explicitly the secret. In the PSK-NEGOTIATE
270
		 * which required the client to send explicitly the secret. In the PSK-NEGOTIATE
(-)a/library.c (-1 / +1 lines)
Lines 122-128 const struct vpn_proto openconnect_protos[] = { Link Here
122
		.add_http_headers = cstp_common_headers,
122
		.add_http_headers = cstp_common_headers,
123
		.obtain_cookie = cstp_obtain_cookie,
123
		.obtain_cookie = cstp_obtain_cookie,
124
		.udp_protocol = "DTLS",
124
		.udp_protocol = "DTLS",
125
#ifdef HAVE_DTLS
125
#if defined(HAVE_DTLS) && !defined(LIBRESSL_VERSION_NUMBER)
126
		.udp_setup = dtls_setup,
126
		.udp_setup = dtls_setup,
127
		.udp_mainloop = dtls_mainloop,
127
		.udp_mainloop = dtls_mainloop,
128
		.udp_close = dtls_close,
128
		.udp_close = dtls_close,
(-)a/main.c (-2 / +2 lines)
Lines 635-641 static void print_build_opts(void) Link Here
635
		sep = comma;
635
		sep = comma;
636
	}
636
	}
637
637
638
#ifdef HAVE_DTLS
638
#if defined(HAVE_DTLS) && !defined(LIBRESSL_VERSION_NUMBER)
639
	printf("%sDTLS", sep);
639
	printf("%sDTLS", sep);
640
#endif
640
#endif
641
#ifdef HAVE_ESP
641
#ifdef HAVE_ESP
Lines 643-649 static void print_build_opts(void) Link Here
643
#endif
643
#endif
644
	printf("\n");
644
	printf("\n");
645
645
646
#if !defined(HAVE_DTLS) || !defined(HAVE_ESP)
646
#if !defined(HAVE_DTLS) || !defined(HAVE_ESP) || defined(LIBRESSL_VERSION_NUMBER)
647
	printf(_("WARNING: This binary lacks DTLS and/or ESP support. Performance will be impaired.\n"));
647
	printf(_("WARNING: This binary lacks DTLS and/or ESP support. Performance will be impaired.\n"));
648
#endif
648
#endif
649
}
649
}
(-)a/openssl-dtls.c (-2 / +1 lines)
Lines 331-337 int start_dtls_handshake(struct openconnect_info *vpninfo, int dtls_fd) Link Here
331
	int dtlsver = DTLS1_BAD_VER;
331
	int dtlsver = DTLS1_BAD_VER;
332
	const char *cipher = vpninfo->dtls_cipher;
332
	const char *cipher = vpninfo->dtls_cipher;
333
333
334
#ifdef HAVE_DTLS12
334
#if defined(HAVE_DTLS12) && !defined(LIBRESSL_VERSION_NUMBER)
335
	/* These things should never happen unless they're supported */
335
	/* These things should never happen unless they're supported */
336
	if (vpninfo->cisco_dtls12) {
336
	if (vpninfo->cisco_dtls12) {
337
		dtlsver = DTLS1_2_VERSION;
337
		dtlsver = DTLS1_2_VERSION;
338
- 

Return to bug 695630