openssl-machine
c721580653
Copyright year updates
...
Reviewed-by: Tomas Mraz <tomas@openssl.org >
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org >
MergeDate: Tue Mar 10 14:37:54 2026
Release: yes
2026-03-10 14:37:52 +00:00
Philip Prindeville
7b6c638dd5
Cleanup of printing in apps
...
Don't use BIO_printf() where BIO_puts() will do.
Reviewed-by: Paul Dale <paul.dale@oracle.com >
Reviewed-by: Shane Lontis <shane.lontis@oracle.com >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
MergeDate: Fri Feb 13 15:05:38 2026
(Merged from https://github.com/openssl/openssl/pull/29677 )
2026-02-13 16:05:36 +01:00
Bernd Edlinger
c0a7890b62
Fix a memory leak in sctp code
...
There is a memory leak of the addrinfo struct when
`./openssl s_server -dtls -sctp -accept 127.0.0.1:4433`
is used, but `sysctl -w net.sctp.auth_enable=1`
is not done before.
Additionally this fixes an oversight, when
`./openssl s_client -dtls -sctp -connect localhost:4433`
is used to connect to above server.
The first connect attempt is to IPv6 ::1, which might fail,
but the second attempt might still succeed, so continue to
try all addesses even when the SCTP socket fails for one of them.
Reviewed-by: Neil Horman <nhorman@openssl.org >
Reviewed-by: Paul Yang <paulyang.inf@gmail.com >
Reviewed-by: Matt Caswell <matt@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/29541 )
2026-01-06 07:56:14 -05:00
Bob Beck
2fab90bb5e
4.0-POST-CLANG-FORMAT-WEBKIT
...
Reviewed-by: Saša Nedvědický <sashan@openssl.org >
Reviewed-by: Neil Horman <nhorman@openssl.org >
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/29242 )
2025-12-09 00:28:19 -07:00
Joshua Rogers
3005b9bc86
apps/s_socket: fix FD and addrinfo leak on SCTP failure in init_client
...
If BIO_new_dgram_sctp(*sock, BIO_NOCLOSE) fails we returned 0 directly,
skipping the out: cleanup and leaking the just created socket plus the
addrinfo lists.
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com >
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com >
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com >
(Merged from https://github.com/openssl/openssl/pull/28917 )
2025-11-18 17:59:50 +01:00
Joshua Rogers
76b4fa346c
apps/s_socket: fix double close of listening socket when naccept==0
...
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com >
Reviewed-by: Matt Caswell <matt@openssl.org >
Reviewed-by: Saša Nedvědický <sashan@openssl.org >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/28813 )
2025-10-17 19:05:15 +02:00
Joshua Rogers
694b4159ba
s_socket: continue in loop, on bind fail
...
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com >
Reviewed-by: Matt Caswell <matt@openssl.org >
Reviewed-by: Saša Nedvědický <sashan@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/28814 )
2025-10-14 17:55:41 +02:00
AntonMoryakov
3161f460fa
apps: lib: Prevent potential NULL dereference in init_client()
...
apps: lib: Simplify ba_ret handling in init_client()
Simplify logic around ba_ret assignment:
- Fail early if ba_ret == NULL
- Assign directly otherwise, without checking *ba_ret
This avoids extra nesting and matches OpenSSL's conventions.
CLA: trivial
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com >
Co-authored-by: Tomas Mraz <tomas@openssl.org >
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com >
Reviewed-by: Paul Dale <ppzgs1@gmail.com >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/26783 )
2025-05-29 16:37:41 +02:00
openssl-machine
0c679f5566
Copyright year updates
...
Reviewed-by: Neil Horman <nhorman@openssl.org >
Reviewed-by: Matt Caswell <matt@openssl.org >
Release: yes
2025-03-12 13:35:59 +00:00
Nadav Tasher
113c12ee8c
s_socket: naccept: close listening socket after accepting clients
...
When `-naccept` is passed (i.e with `s_server`), the listening socket remains open while handling
client, even after `naccept` is supposed to reach `0`.
This is caused to to the decrementation of `naccept` and closing of the socket
happening a little too late in the `do_server` function.
Signed-off-by: Nadav Tasher <tashernadav@gmail.com >
Reviewed-by: Neil Horman <nhorman@openssl.org >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/26228 )
2025-01-22 09:20:14 +01:00
FdaSilvaYY
23b795d34f
apps: directly inclusion of "e_os.h when needed
...
Reviewed-by: Paul Dale <ppzgs1@gmail.com >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/14344 )
2024-09-05 17:02:51 +02:00
Tomas Mraz
7ed6de997f
Copyright year updates
...
Reviewed-by: Neil Horman <nhorman@openssl.org >
Release: yes
2024-09-05 09:35:49 +02:00
Tomas Mraz
4fa9d1f40f
Avoid leaking *ba_ret on reconnections
...
Also fixes Coverity 1604639
There is no point in checking ba_ret as it can never be NULL.
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com >
Reviewed-by: Paul Dale <ppzgs1@gmail.com >
(Merged from https://github.com/openssl/openssl/pull/24931 )
2024-07-31 11:23:16 +02:00
Randall S. Becker
0339382aba
Remove all references to FLOSS for NonStop Builds.
...
FLOSS is no longer a dependency for NonStop as of the deprecation of the SPT
thread model builds.
Fixes : #24214
Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca >
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com >
Reviewed-by: Neil Horman <nhorman@openssl.org >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/24217 )
2024-04-24 09:35:29 +02:00
Sebastian Andrzej Siewior
8a1694f225
apps: Don't print hostname on bio_out during connect.
...
Printing the hostname on bio_out clutters the output and breaks
pipe like forwarding via openssl.
Print the hostname via bio_err.
Fixes #23013
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc >
Reviewed-by: Richard Levitte <levitte@openssl.org >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/23056 )
2023-12-29 11:50:18 +01:00
Matt Caswell
da1c088f59
Copyright year updates
...
Reviewed-by: Richard Levitte <levitte@openssl.org >
Release: yes
2023-09-07 09:59:15 +01:00
Matt Caswell
f34e5d7a12
Add QUIC support to s_client
...
Reviewed-by: Hugo Landau <hlandau@openssl.org >
Reviewed-by: Tim Hudson <tjh@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/20580 )
2023-05-08 10:13:39 +01:00
FdaSilvaYY
9929c81702
apps & al : Fix various typos, repeated words, align some spelling to LDP.
...
Mostly revamped from #16712
- fall thru -> fall through
- time stamp -> timestamp
- host name -> hostname
- ipv6 -> IPv6
Reviewed-by: Tomas Mraz <tomas@openssl.org >
Reviewed-by: Paul Dale <pauli@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/19059 )
2022-10-12 16:55:28 +11:00
Matt Caswell
fecb3aae22
Update copyright year
...
Reviewed-by: Tomas Mraz <tomas@openssl.org >
Release: yes
2022-05-03 13:34:51 +01:00
Todd Short
a3e53d5683
Add TFO support to socket BIO and s_client/s_server
...
Supports Linux, MacOS and FreeBSD
Disabled by default, enabled via `enabled-tfo`
Some tests
Reviewed-by: Matt Caswell <matt@openssl.org >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
Reviewed-by: Tim Hudson <tjh@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/8692 )
2022-03-10 10:42:43 -05:00
Todd Short
54b6755702
Set protocol in init_client()
...
If TCP is being used, protocol = 0 is passed to init_client(), then
protocol == IPPROTO_TCP fails when attempting to set BIO_SOCK_NODELAY.
Reviewed-by: Tomas Mraz <tomas@openssl.org >
Reviewed-by: Tim Hudson <tjh@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/17838 )
2022-03-10 09:24:48 -05:00
Dr. David von Oheimb
4599ea9fe3
Fix HTTP server port output and allow dynamic verbosity setting
...
Reviewed-by: Paul Dale <pauli@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/16061 )
2021-11-22 15:38:39 +01:00
Tomas Mraz
e8655e16ca
s_socket.c: Avoid possible NULL pointer dereference
...
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com >
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de >
(Merged from https://github.com/openssl/openssl/pull/16736 )
2021-10-06 17:23:28 +02:00
Dr. David von Oheimb
2342d9b650
apps/lib/s_socket.c: Fix mem leak on host name in init_client()
...
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/16688 )
2021-10-04 10:55:39 +02:00
Zengit
994fa5f986
Socket now displays what address it is connecting to
...
CLA: trivial
Reviewed-by: Tomas Mraz <tomas@openssl.org >
Reviewed-by: Paul Dale <pauli@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/16392 )
2021-09-08 13:31:51 +10:00
Tanzinul Islam
ab98861e91
Redefine getpid() -> _getpid() only for MSVC
...
This was introduced in 814b5133e for MSVC. C++Builder doesn't need it.
Reviewed-by: Paul Dale <pauli@openssl.org >
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com >
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com >
(Merged from https://github.com/openssl/openssl/pull/16192 )
2021-07-31 20:26:37 +01:00
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
Richard Levitte
814b5133e9
apps/lib/s_socket.c: Alias getpid with _getpid for _WIN32
...
Reviewed-by: Shane Lontis <shane.lontis@oracle.com >
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/15710 )
2021-06-11 09:48:54 +02:00
Dr. David von Oheimb
d63053bbdf
80-test_cmp_http.t: Improve the way the test server is launched and killed
...
Reviewed-by: Paul Dale <pauli@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/15642 )
2021-06-09 14:03:16 +02:00
Dr. David von Oheimb
d357dd51cb
apps/lib/s_socket.c and 80-test_cmp_http.t: Make ACCEPT port reporting more robust
...
Reviewed-by: Tomas Mraz <tomas@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/15417 )
2021-05-29 07:47:03 +02:00
Matt Caswell
0789c7d834
Update copyright year
...
Reviewed-by: Richard Levitte <levitte@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/15381 )
2021-05-20 14:22:33 +01:00
Richard Levitte
a12da5dafb
APPS: Make the cmp Mock server output the accept address and port
...
Fixes #14694
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com >
(Merged from https://github.com/openssl/openssl/pull/15281 )
2021-05-16 12:07:14 +02:00
Richard Levitte
403ef8cea7
APPS: Guard use of IPv6 functions and constants with a check of AF_INET6
...
Fixes #13482
Reviewed-by: Matt Caswell <matt@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/13484 )
2020-11-25 06:09:23 +01:00
Randall S. Becker
08073700cc
NonStop port updates for 3.0.0.
...
HPE NonStop Port Changes for 3.0.0 Includes unthreaded, PUT, and SPT for OSS.
The port changes include wrapping where necessary for FLOSS and
appropriate configuration changes to support that. Two tests
are excluded as being inappropriate for the platform.
The changes are:
* Added /usr/local/include to nonstop-nsx_spt_floss to load floss.h
* Added SPT Floss variant for NonStop
* Wrapped FLOSS definitions in OPENSSL_TANDEM_FLOSS to allow selective enablement.
* SPT build configuration for NonStop
* Skip tests not relevant for NonStop
* PUT configuration changes required for NonStop platforms
* Configurations/50-nonstop.conf: updates for TNS/X platform.
* FLOSS instrumentation for HPE NonStop TNS/X and TNS/E platforms.
* Configurations/50-nonstop.conf: modifications for non-PUT TNS/E platform b
* Fix use of DELAY in ssltestlib.c for HPNS.
* Fixed commit merge issues and added floss to http_server.c
CLA: Permission is granted by the author to the OpenSSL team to use these modifications.
Fixes #5087 .
Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com >
Reviewed-by: Shane Lontis <shane.lontis@oracle.com >
Reviewed-by: Richard Levitte <levitte@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/12800 )
2020-09-12 20:32:11 +02:00
Matt Caswell
454afd9866
Update copyright year
...
Reviewed-by: Richard Levitte <levitte@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/11839 )
2020-05-15 14:09:49 +01:00
Dmitry Belyavskiy
edbb56ee4f
s_server normal shutdown
...
Partially fixes #11209
Reviewed-by: Matt Caswell <matt@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/11734 )
2020-05-06 17:53:17 +03:00
Richard Levitte
2ad75c6c13
Move libapps.a source to apps/lib
...
This makes it clearer what's what. The 'openssl' application and its
sub-commands remain in apps/
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org >
(Merged from https://github.com/openssl/openssl/pull/9723 )
2019-09-04 17:26:07 +02:00