aboutsummaryrefslogtreecommitdiffstats
path: root/demos
Commit message (Collapse)AuthorAgeFilesLines
* demos: wire up echechoEugene Syromiatnikov2026-07-202-0/+10
| | | | | | | | | | | Complements: 50580382caca "Documents initial agreed APIs for Encrypted Client Hello (ECH) and includes a minimal demo for some of those APIs." Reported-by: Frederik Wedel-Heinen <[email protected]> Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:19:04 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/sslecho/echecho.c: apply Windows-specific changesEugene Syromiatnikov2026-07-201-26/+44
| | | | | | | | | | | | Similar to the ones present in demos/sslecho/main.c. Complements: 50580382caca "Documents initial agreed APIs for Encrypted Client Hello (ECH) and includes a minimal demo for some of those APIs." Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:19:03 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/sslecho/echecho.c: check return values of SSL_* callsEugene Syromiatnikov2026-07-201-3/+15
| | | | | | | | | | | | | As otherwise it triggers -Werror=unused-result when built with --strict-warnings. Complements: 50580382caca "Documents initial agreed APIs for Encrypted Client Hello (ECH) and includes a minimal demo for some of those APIs." Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:19:01 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/sslecho/echecho.c: use SSL_set1_ipaddr() instead of SSL_set1_host()Eugene Syromiatnikov2026-07-201-1/+1
| | | | | | | | | | | | | As the latter was deprecated in commit f584ae959cbc "Let's support multiple names for certificate verification". Complements: 50580382caca "Documents initial agreed APIs for Encrypted Client Hello (ECH) and includes a minimal demo for some of those APIs." Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:19:00 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/sslecho/echecho.c: declare locally used functions as staticEugene Syromiatnikov2026-07-201-5/+5
| | | | | | | | | | | | | Otherwise it triggers -Werror=missing-prototypes when built with --strict-warnings. Complements: 50580382caca "Documents initial agreed APIs for Encrypted Client Hello (ECH) and includes a minimal demo for some of those APIs." Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:18:59 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/sslecho/echecho.c: use <stdbool.h>Eugene Syromiatnikov2026-07-201-4/+1
| | | | | | | | | | | | ...instead of defining it (incorrectly). Complements: 50580382caca "Documents initial agreed APIs for Encrypted Client Hello (ECH) and includes a minimal demo for some of those APIs." Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:18:58 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/sslecho/echecho.c: reflow overly long linesEugene Syromiatnikov2026-07-201-10/+19
| | | | | | | | | | Complements: 50580382caca "Documents initial agreed APIs for Encrypted Client Hello (ECH) and includes a minimal demo for some of those APIs." Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:18:57 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos: add PKCS#12 reading and writing demos to the primary build systemEugene Syromiatnikov2026-07-202-1/+17
| | | | | | | | | | | | | | | For some reason, demos in the pkcs12 directory were omitted during the initial conversion done in commit 2000281dad31 "Convert demos to primary build system". Rescind this omission. Complements: 2000281dad31 "Convert demos to primary build system" Reported-by: Frederik Wedel-Heinen <[email protected]> Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:18:55 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/pkcs12/pkwrite.c: drop deprecated init callsEugene Syromiatnikov2026-07-201-2/+0
| | | | | | | | | Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:18:54 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/README.txt: mention quic-server-block.c and quic-server-non-block.cEugene Syromiatnikov2026-07-201-0/+2
| | | | | | | | | | | Complements: dad45ea769dc "Adds a new demo blocking QUIC server for use with the existing demo QUIC clients" Complements: d9d4d84ceb01 "Add demo QUIC non-blocking server" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:18:53 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos: wire up tls-server-blockEugene Syromiatnikov2026-07-202-0/+6
| | | | | | | | | | | | | | | | | | | The blocking TLS server demo code was added f4b4a185b546 "MVP demo TLS server", which, while was applied after 2000281dad31 "Convert demos to primary build system", was authored before, and hasn't been updated accordingly. Rescind that omission by add the relevant introes to build.info. Also, while at it, mention tls-server-block in demos/README.txt. Complements: f4b4a185b546 "MVP demo TLS server" Reported-by: Frederik Wedel-Heinen <[email protected]> Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:18:52 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* demos/guide/tls-server-block.c: check results of __owur API callsEugene Syromiatnikov2026-07-201-2/+9
| | | | | | | | | | | | | | Check results of SSL_CTX_set_session_id_context() and SSL_CTX_set_timeout() calls, as these functions are marked with __owur, leading to compilation error when compiled with -Werror=unused-result. Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Bob Beck <[email protected]> MergeDate: Mon Jul 20 11:18:51 2026 (Merged from https://github.com/openssl/openssl/pull/31751)
* Remove parentheses around return argumentsDimitri Papadopoulos2026-07-081-1/+1
| | | | | | | | | | | | | | Since return is an operator and not a function, parentheses are not required. Found by running the checkpatch.pl Linux script to enforce coding style. Reviewed-by: Kurt Roeckx <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> MergeDate: Wed Jul 8 10:11:13 2026 (Merged from https://github.com/openssl/openssl/pull/31860)
* Eliminate/fix repeated word usageDimitri Papadopoulos2026-07-081-1/+1
| | | | | | | | | | | Found by running the checkpatch.pl Linux script to enforce coding style. Reviewed-by: Kurt Roeckx <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> MergeDate: Wed Jul 8 10:11:11 2026 (Merged from https://github.com/openssl/openssl/pull/31860)
* demo: fix fips-version Makefile so it loads the FIPS provider correctlyPauli2026-07-011-2/+5
| | | | | | | | Fixes #31760 Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> (Merged from https://github.com/openssl/openssl/pull/31762)
* demo: add program that shows how to query the FIPS provider versionPauli2026-06-296-1/+106
| | | | | | Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Simo Sorce <[email protected]> (Merged from https://github.com/openssl/openssl/pull/31654)
* demos/http3: fix missing NUL terminator on h3ssl->urlShmael132026-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the HTTP/3 demo server's :path handler, when the path value does not begin with '/', the value is copied into the fixed-size url[MAXURL] buffer with memcpy(h3ssl->url, vvalue.base, len) and no terminator is written. len is capped at MAXURL, so a :path value of MAXURL or more bytes fills the entire buffer, overwriting the zeroes from the preceding memset and leaving url without a NUL terminator. The buffer is later used as a C string by strcat() and strcmp() when building the file name, resulting in a heap out-of-bounds read and a possible overflow of the filename[PATH_MAX] buffer. This is reachable from a client-supplied :path header. Cap the length at MAXURL - 1 so that the trailing byte zeroed by the memset always remains, guaranteeing url is NUL-terminated in every branch. The '/'-prefixed branches are unaffected as they already write an explicit terminator within the smaller bound. Fixes #31516 Reviewed-by: Tim Hudson <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Neil Horman <[email protected]> MergeDate: Sun Jun 21 16:19:08 2026 (Merged from https://github.com/openssl/openssl/pull/31520)
* Use %zu for printing size_t valuesAndrew Dinh2026-06-152-8/+8
| | | | | | | | Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Milan Broz <[email protected]> MergeDate: Mon Jun 15 19:24:43 2026 (Merged from https://github.com/openssl/openssl/pull/31454)
* Fix broken hex data by reformattingNorbert Pocs2026-06-037-2529/+260
| | | | | | | | | | | | | | | | The clang format broke some data in hexadecimal format. To make the tool obedient, the trailing comma needs to be removed, then it interpretes the data differently and therefore does not reformat it. The format can then be changed to the correct form. Fixes: https://github.com/openssl/project/issues/1959 Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Milan Broz <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> MergeDate: Wed Jun 3 07:46:14 2026 (Merged from https://github.com/openssl/openssl/pull/31350)
* demos/guide: switch clients to HTTP/1.1Eugene Adell2026-05-037-20/+20
| | | | | | | | | | | The Host Header comes with HTTP/1.1, not 1.0, and some Web Server now doesn't want to answer to such requests. Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> MergeDate: Sun May 3 15:21:35 2026 (Merged from https://github.com/openssl/openssl/pull/30981)
* Use INVALID_SOCKET in SSLEcho demoMilan Broz2026-04-301-8/+9
| | | | | | | | | | | | | | | | On Windows, SOCKET type is unsigned. All comparison with negative value produces signed/unsigned warnings, moreover the code is incorrect in error path. Use INVALID_SOCKET define that should work on all platforms to detect error. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> MergeDate: Thu Apr 30 11:42:31 2026 (Merged from https://github.com/openssl/openssl/pull/30941)
* Remove unused warnx from QUIC demosMilan Broz2026-04-303-28/+0
| | | | | | | | | | It only produces missing prototype warnings. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> MergeDate: Thu Apr 30 11:42:30 2026 (Merged from https://github.com/openssl/openssl/pull/30941)
* Remove redefined progname from QUIC demosMilan Broz2026-04-301-2/+0
| | | | | | | | | | The global progname is already defined above. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> MergeDate: Thu Apr 30 11:42:28 2026 (Merged from https://github.com/openssl/openssl/pull/30941)
* Update manuals and demos to consider OSSL_PARAM_clear_free() vs ↵Emmalee Carpenter2026-04-031-2/+2
| | | | | | | | | OSSL_PARAM_free() Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Paul Dale <[email protected]> MergeDate: Fri Apr 3 15:14:25 2026 (Merged from https://github.com/openssl/openssl/pull/30506)
* Copyright year updatesopenssl-machine2026-03-1011-11/+11
| | | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> MergeDate: Tue Mar 10 14:37:54 2026 Release: yes
* Let's support multiple names for certificate verificationBob Beck2026-02-248-8/+8
| | | | | | | | | | | | | | | | | | | This adds the functionality to VERIFY_PARAM to separately add multiple ip's and email addresses for verification purposes. We then mark the unfortunate SSL_add1_host API which unfortunately aquired a confusing "maybe add an IP address" behaviour as deprecated. We replace this with SSL_set1_<dnsname, email, ip, ip_asc> and SSL_add1_<dnsname, email, ip, ip_asc> to set the things in the SSL corresponding to the VERIFY_PARAM funcitons. Fixes: https://github.com/openssl/openssl/issues/28418 Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> MergeDate: Tue Feb 24 14:03:42 2026 (Merged from https://github.com/openssl/openssl/pull/29612)
* ECH external APIssftcd2026-02-201-1/+1
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/25663)
* ECH build artefacts and a bit of codeStephen Farrell2026-02-202-1/+48
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/25193)
* Documents initial agreed APIs for Encrypted Client Hello (ECH)Stephen Farrell2026-02-201-0/+406
| | | | | | | | | and includes a minimal demo for some of those APIs. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/24738)
* Make X509_ATTRIBUTE accessor functions const-correctkovan2026-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The X509_ATTRIBUTE accessor functions were not const-correct, preventing callers from usefully interacting with a const X509_ATTRIBUTE pointer. Update the following functions to accept const X509_ATTRIBUTE * and return const pointers where appropriate: - X509_ATTRIBUTE_get0_object: returns const ASN1_OBJECT * - X509_ATTRIBUTE_get0_type: returns const ASN1_TYPE * - X509_ATTRIBUTE_get0_data: returns const void * Also update dependent PKCS12 functions: - PKCS12_get_attr_gen: returns const ASN1_TYPE * - PKCS12_get_attr: returns const ASN1_TYPE * (deprecated) - PKCS8_get_attr: returns const ASN1_TYPE * Update all callers to use const pointers for the return values. Fixes #29811 Co-Authored-By: Claude Opus 4.5 <[email protected]> Reviewed-by: Frederik Wedel-Heinen <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> Reviewed-by: David von Oheimb <[email protected]> Reviewed-by: Tim Hudson <[email protected]> MergeDate: Fri Feb 13 14:46:26 2026 (Merged from https://github.com/openssl/openssl/pull/29813)
* Update ossl-http3-demo to support multiple requestsNeil Horman2026-02-062-53/+173
| | | | | | | | | | | | | | | | | | | | | In order to use our http3 demo to do interop testing, said demo needs to be able to handle multiple requests and responses written to specific output files. Add that code here, allowing us to specify optionally a list of requests on the command line to send to the server, as well as a download directory, so that requests made get written locally to the same name as the request in the specified download directory. while we're at it, also clean up the code infrastructure to use SSL_poll to do read-ready checking, rather than iterating/mutating the internal hash table, which is questionable to do (i.e. we shouldn't be removing elements from the hash table while iterating over it). Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> MergeDate: Fri Feb 6 12:46:24 2026 (Merged from https://github.com/openssl/openssl/pull/29922)
* demos/bio/sconnect.c: Add check for BIO_new()Jiasheng Jiang2025-12-281-0/+8
| | | | | | | | | | | | Add check for the return value of BIO_new() to guarantee the success. Fixes: 0f113f3ee4 ("Run util/openssl-format-source -v -c .") Signed-off-by: Jiasheng Jiang <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> Reviewed-by: Frederik Wedel-Heinen <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27919)
* 4.0-POST-CLANG-FORMAT-WEBKIT4.0-POST-CLANG-FORMAT-WEBKITBob Beck2025-12-0970-1078/+3427
| | | | | | | Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> (Merged from https://github.com/openssl/openssl/pull/29242)
* clang deprecates sprintf on macosNikola Pajkovsky2025-10-211-3/+3
| | | | | | | | | | | | | | test/threadstest.c:1376:9: error: 'sprintf' is deprecated. The same issues is in the ossl-nghttp3-demo. Signed-off-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28903)
* Make eyeballs happy again for ossl-nghttp3-demoAlexandr Nedvedicky2025-10-144-86/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the http3 demo client so it works better on dual stack hosts. This fixes the case when DNS returns both IPv4 and IPv6 addresses for host we try to reach. The current code just uses the first address found in DNS answer. If things are unfortunate and the service (port number) demo client tries to reach does not listen on the address then demo gives up and exits. Demo can do better. The RFC 6555 suggests application should try to reach the service on the next address returned by DNS, when the first attempt fails for the first address returned by DNS. This change helps with situation when DNS prefers, let' say, IPv6 address, but the service is reachable via IPv4 only. In that case application sees the failure on the first attempt to connect to remote server over IPv6, but the second attempt that uses IPv4 is going to succeed. This extra handling is required for QUIC which uses UDP protocol. For TLS client which uses TCP all this happens inside BIO layer which tries to establish TCP connection. There is no TCP-handshake on UDP protocol so BIO can not see the service is not reachable on requested address. Fixes: #28331 Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28802)
* Add util/codespell-check.sh and run itBob Beck2025-09-261-2/+2
| | | | | | | Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28639)
* demos/certs: properly handle "$@"Eugene Syromiatnikov2025-09-033-4/+4
| | | | | | | | | | | | | | | There is little reason $@ should be used unquoted; also, "$@" should be used instead of $* in order to pass the script arguments to a function. Fixes: bcd92754d56a "demos: fix cert scripts" Fixes: 79b184fb4b65 "Extend certificate creation examples to include CRL generation and sample" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28405)
* Copyright year updatesopenssl-machine2025-09-0226-26/+26
| | | | | | Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Release: yes
* Fix: Add free to avoid memory leak.Nachel722025-08-294-4/+16
| | | | | | | | | Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Paul Yang <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28289)
* Fix RSA key size validation in EVP_PKEY_RSA_keygen demoQuin-Darcy2025-08-111-1/+1
| | | | | | | | | | | | The validation was checking the default 'bits' value (4096) instead of the parsed 'bits_i' from the command line arguments, allowing invalid key sizes to bypass the 512-bit minimum. CLA: trivial Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Shane Lontis <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28139)
* demos: use array memory (re)allocation routinesEugene Syromiatnikov2025-08-081-9/+8
| | | | | | | | | | Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28059)
* Introduce SSL_OP_SERVER_PREFERENCE to replace ↵Michael Baentsch2025-07-091-3/+3
| | | | | | | | SSL_OP_CIPHER_SERVER_PREFERENCE misnomer Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27981)
* demos: Silence warnings on Win64 buildsTomas Mraz2025-07-0221-42/+51
| | | | | | Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27806)
* demos/cms/cms_denc.c: Add check for BIO_new_file()Jiasheng Jiang2025-07-011-1/+1
| | | | | | | | | | | | Add check for the return value of BIO_new_file(). Fixes: 1728756 ("Detached encrypt/decrypt example, fix decrypt sample.") Signed-off-by: Jiasheng Jiang <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27897)
* demos/cms/cms_ddec.c: Replace "in" with "dcont" to correctly check the ↵Jiasheng Jiang2025-07-011-1/+1
| | | | | | | | | | | | | success of BIO_new_file() Replace "in" with "dcont" to properly check the return value of BIO_new_file(). Fixes: 1728756 ("Detached encrypt/decrypt example, fix decrypt sample.") Signed-off-by: Jiasheng Jiang <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27896)
* Avoid potential double close of client_skt in sslechoLevi Zim2025-06-201-0/+5
| | | | | | | | | | | | | | | | | The server_running variable is declared as volatile and some comments in the code are mentioning about implementing CTRL+C handler in the future. In the client handling loop, the client_skt is closed at the end of the loop if server_running is true. If (future) CTRL+C handler changes server_running to false at this time. The next accept will not happen and the exit clean up code will close client_skt for the second time. This patch fixes this potential double close by setting client_skt back to -1 after closing it. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27405)
* initial implementation of http/1.0 server to benchmark OpenSSL QUICsashan2025-05-314-1/+1996
| | | | | | | | | | | | stack. The server currently replies with HTTP 200 OK only. It provides text/plain response body. It only accepts GET request with any URI. Any other requests will make server to drop stream/connection. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27508)
* demos/bio/sconnect.c: Free ssl_bio on error to avoid memory leakJiashengJiang2025-05-191-1/+3
| | | | | | | | | | | Call BIO_free() to release ssl_bio if an error occurs before BIO_push(), preventing a memory leak. Fixes: 396e720965 ("Fix certificate validation for IPv6 literals in sconnect demo") Signed-off-by: JiashengJiang <[email protected]> Reviewed-by: Tom Cosgrove <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27639)
* demos/guide/tls-client-block.c Spelling correctionBenson Muite2025-05-161-1/+1
| | | | | | | | | | Fix spelling error in one word. CLA: trivial Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Tom Cosgrove <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27611)
* sslecho: Rename bool to flag to avoid C23 conflictTomas Mraz2025-04-301-5/+5
| | | | | | | | Fixes #27516 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27519)