openssl/apps
Daiki Ueno 09c1db3399 apps: Use the first detected address family if IPv6 is not available
This is a follow up of 15729bef38.  Even
when the host does not support IPv6 at all, BIO_lookup_ex may now
return IN6ADDR_ANY in addition to INADDR_ANY, as the second element of
the ai_next field.

After eee8a40aa5, the do_server function
prefers the IPv6 address and fails on the BIO_socket call.  This adds
a fallback code to retry with the IPv4 address returned as the first
element to avoid the error.

The failure had been partially avoided in the previous code with
AI_ADDRCONFIG, because getaddrinfo returns only IPv4 address if no
IPv6 address is associated with external interface.  However, it would
be still a problem if the external interface has an IPv6 address
assigned, while the loopback interface doesn't.

Signed-off-by: Daiki Ueno <dueno@redhat.com>

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16074)
2021-07-16 08:58:06 +02:00
..
demoSRP
include apps: add query to allow a command to know of a provider command line option was processed 2021-07-12 09:13:41 +10:00
lib apps: Use the first detected address family if IPv6 is not available 2021-07-16 08:58:06 +02:00
asn1parse.c
build.info
ca-cert.srl
ca-key.pem
ca-req.pem
ca.c Remove executable mode attributes of non-executable files 2021-07-13 16:04:32 +10:00
CA.pl.in apps/CA.pl.in: restore the quotes around -CAfile, they were there for a reason 2021-06-26 06:43:09 +02:00
cert.pem
ciphers.c
client.pem
cmp.c HTTP client: fix use of OSSL_HTTP_adapt_proxy(), which is needed also in cmp.c 2021-06-16 14:36:01 +01:00
cms.c apps: use get_cipher_any() instead of get_cipher() for commands that support these ciphers/modes 2021-06-16 18:32:30 +10:00
crl2pkcs7.c
crl.c Add support for ISO 8601 datetime format 2021-06-11 12:39:46 +02:00
ct_log_list.cnf
dgst.c
dhparam.c
dsa512.pem
dsa1024.pem
dsa-ca.pem
dsa-pca.pem
dsa.c
dsap.pem
dsaparam.c
ec.c
ecparam.c
enc.c apps: remove AEAD/mode checks that are now redundant 2021-06-16 18:32:30 +10:00
engine.c
errstr.c
fipsinstall.c fipsinstall: use the app's libctx and property query when searching for algorithms 2021-06-15 18:26:47 +10:00
gendsa.c
genpkey.c apps: remove AEAD/mode checks that are now redundant 2021-06-16 18:32:30 +10:00
genrsa.c
info.c
insta.ca.crt
kdf.c kdf: use the app's libctx and property query when searching for algorithms 2021-06-15 18:26:47 +10:00
list.c list: use the app's libctx and property query when searching for algorithms 2021-06-15 18:26:47 +10:00
mac.c
nseq.c
ocsp.c
openssl-vms.cnf
openssl.c
openssl.cnf
passwd.c
pca-cert.srl
pca-key.pem
pca-req.pem
pkcs7.c
pkcs8.c
pkcs12.c Don't add the first pkcs12 certificate multiple times 2021-07-09 10:24:32 +10:00
pkey.c APPS: Restore the possibility to combine -pubout with -text 2021-06-10 08:34:09 +02:00
pkeyparam.c
pkeyutl.c
prime.c
privkey.pem
progs.pl
rand.c
rehash.c
req.c Fix 'openssl req' to correctly use the algorithm from '-newkey algo:nnnn' 2021-06-26 10:31:04 +02:00
req.pem
rsa8192.pem
rsa.c Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 2021-06-09 17:00:10 +02:00
rsautl.c
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_client.c Remove "-immedate_renegotiation" option 2021-06-15 12:36:51 +02:00
s_server.c Fix s_server PSK handling 2021-07-09 10:45:36 +10:00
s_time.c s_time: avoid unlikely division by zero 2021-06-30 13:55:09 +10:00
server2.pem
server.pem
server.srl
sess_id.c
smime.c apps: use get_cipher_any() instead of get_cipher() for commands that support these ciphers/modes 2021-06-16 18:32:30 +10:00
speed.c apps: fix Coverity 1451531 Unchecked return value 2021-07-09 09:18:10 +10:00
spkac.c spkac: allow digests other than MD5 to be used for signing 2021-06-15 18:26:34 +10:00
srp.c
storeutl.c
testCA.pem
testdsa.h
testrsa.h
timeouts.h
ts.c
tsget.in
verify.c
version.c
vms_decc_init.c
x509.c Fix segfault in openssl x509 -modulus 2021-06-26 11:40:34 +10:00