Commit Graph

9 Commits

Author SHA1 Message Date
Richard Levitte
12c4e67675 test//bio_dgram_test.c: Skip test when BIO_bind() fails
This test isn't supposed to test BIO_bind() itself, so we can be a bit
sloppy and assume that it fails because the attempted binding is not
supported on the platform where this is run.  For example, BIO_bind()
fails when it's given an IPv6 address and the platform where this is
run doesn't support that address family.

In a case like this, it's sensible enough to simply skip the test when
BIO_bind() fails.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20449)
2023-03-07 15:24:54 +01:00
Tomas Mraz
3a857b9532 Implement BIO_s_dgram_mem() reusing the BIO_s_dgram_pair() code
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20012)
2023-01-27 16:11:38 +01:00
Pauli
681c461910 test: condition out code that relies on CHACHA.
Run checker does a no-chacha build and tests fail because it can't be fetched.

Fixes #19363

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19366)
2022-10-10 14:16:08 +01:00
Tomas Mraz
19b6b5f479 Fix older clang warning on initialization
We use memset() instead.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19311)
2022-10-07 20:44:36 +02:00
Hugo Landau
8e90a12ad8 Fix BIO_dgram_pair stochastic test failure
Fixes #19267.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19268)
2022-09-23 10:52:45 +01:00
Hugo Landau
b88ce46ee8 BIO_s_dgram_pair
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18442)
2022-09-23 11:59:13 +10:00
Tom Cosgrove
ce41a53dc6 Fix tests when configured with -DOPENSSL_USE_IPV6=0
In include/internal/sockets.h it says that you can disable IPv6, and only
defines OPENSSL_USE_IPV6 (to 0 or 1) if it's not already defined.

The codebase generally then checks `#if OPENSSL_USE_IPV6`.

However, test_bio_dgram uses `#if defined(OPENSSL_USE_IPV6)` which means it tries
to test IPv6 even if it's explicitly configured out with -DOPENSSL_USE_IPV6=0
(`#if defined(OPENSSL_USE_IPV6)` is always true).

This fixes that.

Change-Id: Ie1641c9dd654f27f3bdca186517df5599ad1059b

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19181)
2022-09-12 08:28:30 +02:00
Tomas Mraz
18274e1d6e bio_dgram_test.c: Fix warning from older clang compilers
Older clang compilers warn about the initializer:

test/bio_dgram_test.c:107:29: error: suggest braces around initialization
 of subobject [-Werror,-Wmissing-braces]
    struct in6_addr ina6 = {0};
                            ^
                            {}

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19152)
2022-09-09 08:56:41 +10:00
Hugo Landau
664e096cf9 BIO_dgram support for BIO_sendmmsg/BIO_recvmmsg
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18270)
2022-09-01 18:03:10 +10:00