Matt Caswell [Wed, 13 Mar 2024 15:19:43 +0000 (15:19 +0000)]
Fix unbounded memory growth when using no-cached-fetch
When OpenSSL has been compiled with no-cached-fetch we do not cache
algorithms fetched from a provider. When we export an EVP_PKEY to a
provider we cache the details of that export in the operation cache for
that EVP_PKEY. Amoung the details we cache is the EVP_KEYMGMT that we used
for the export. When we come to reuse the key in the same provider that
we have previously exported the key to, we check the operation cache for
the cached key data. However because the EVP_KEYMGMT instance was not
cached then instance will be different every time and we were not
recognising that we had already exported the key to the provider.
This causes us to re-export the key to the same provider everytime the key
is used. Since this consumes memory we end up with unbounded memory growth.
The fix is to be more intelligent about recognising that we have already
exported key data to a given provider even if the EVP_KEYMGMT instance is
different.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23841)
Bernd Edlinger [Sun, 10 Mar 2024 12:15:55 +0000 (13:15 +0100)]
Try to fix intermittent CI failures in quic_multistream test
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23807)
Alexandr Nedvedicky [Thu, 14 Mar 2024 08:53:56 +0000 (09:53 +0100)]
plug potential memory leak in error code path
Function `module_add()` may leak stack of modules when
it fails to initialize newly added module.
Fixes #23835
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23836)
Tomas Mraz [Fri, 15 Mar 2024 10:28:42 +0000 (11:28 +0100)]
Raise the AFL_MAP_SIZE to accommodate future growth
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23851)
Tomas Mraz [Fri, 15 Mar 2024 10:27:41 +0000 (11:27 +0100)]
82-test_ocsp_cert_chain.t: Just ignore unrecognized lines in server output
There might be warnings from AFL fuzz checker
or other warnings that we do not care about.
For success it is just required that cert_status: ocsp response sent:
is present.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23851)
Alexandr Nedvedicky [Thu, 14 Mar 2024 09:40:06 +0000 (10:40 +0100)]
Minor docfix for OSSL_HTTP_REQ_CTX_set_max_response_hdr_lines(3)
Also removal of duplicate assignment and addition of comment
in test/http_test.c
Follow up change to PR #23781
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23837)
Tomas Mraz [Thu, 14 Mar 2024 17:58:00 +0000 (18:58 +0100)]
Set AFL_MAP_SIZE to avoid crash in the AFL CI job
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23843)
Tomas Mraz [Wed, 14 Feb 2024 11:45:15 +0000 (12:45 +0100)]
Add a test using the bandwidth limit filter
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23588)
Tomas Mraz [Mon, 5 Feb 2024 15:03:15 +0000 (16:03 +0100)]
Add support for bandwidth limitation in noisydgram BIO filter
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23588)
Tomas Mraz [Fri, 19 Jan 2024 14:06:45 +0000 (15:06 +0100)]
bio_f_noisy_dgram_filter(): Fix typo
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23588)
Shakti Shah [Tue, 30 Jan 2024 18:56:32 +0000 (00:26 +0530)]
SSL_add_dir_cert_subjects_to_stack(): Documented return values
In the man page for SSL_add_dir_cert_subjects_to_stack(), the functions
returning int have undocumented return values.
Fixes #23171
Signed-off-by: Shakti Shah <shaktishah33@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23433)
Job Snijders [Mon, 29 Jan 2024 20:40:32 +0000 (20:40 +0000)]
Add Content Type OID for id-ct-rpkiSignedPrefixList
References: draft-ietf-sidrops-rpki-prefixlist
Title: "A profile for Signed Prefix Lists for Use in the Resource Public Key Infrastructure (RPKI)"
OID assigned under 'SMI Security for S/MIME CMS Content Type (1.2.840.113549.1.9.16.1)'
https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#security-smime-1
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23426)
Tomas Mraz [Thu, 8 Feb 2024 16:19:19 +0000 (17:19 +0100)]
apps/x509.c: No warning reading from stdin if redirected
Fixes #22893
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23526)
Neil Horman [Thu, 14 Mar 2024 16:04:17 +0000 (12:04 -0400)]
Fix ASLR to be smaller during asan/tsan/ubsan runs
Recently asan/tsan/ubsan runs have been failing randomly. It appears
that a recent runner update may have led to the Address Space Layout
Randomization setting in the linux kernel of ubuntu-latest runner
getting set to too high a value (it defaults to 30). Such a setting
leads to the possibility that a given application will have memory
mapped to an address space that the sanitizer code typically uses to do
its job. Lowering this value allows a/t/ubsan to work consistently
again
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23842)
Frederik Wedel-Heinen [Wed, 13 Mar 2024 09:17:37 +0000 (10:17 +0100)]
Avoid a memcpy in dtls_get_reassembled_message()
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23828)
Vladimirs Ambrosovs [Tue, 12 Mar 2024 16:23:55 +0000 (18:23 +0200)]
Fix dasync_rsa_decrypt to call EVP_PKEY_meth_get_decrypt
Signed-off-by: Vladimirs Ambrosovs <rodriguez.twister@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23825)
Joachim Vandersmissen [Tue, 5 Mar 2024 01:16:23 +0000 (19:16 -0600)]
Implement KAT for KBKDF with KMAC128
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23745)
sharad3001 [Mon, 11 Mar 2024 10:19:01 +0000 (15:49 +0530)]
Update tls13ccstest.c, removal of deadcode
tst has been already checked for invalid value in the start of the function with switch statement.
Checked again here, so removed deadcode
CLA: trivial
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23813)
Frederik Wedel-Heinen [Wed, 14 Feb 2024 09:09:55 +0000 (10:09 +0100)]
Add fuzzing for DTLS
Update the fuzz corpora submodule with the DTLS fuzz corpus.
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23585)
James Muir [Wed, 20 Dec 2023 05:15:17 +0000 (00:15 -0500)]
s_server: test ocsp with "-cert_chain"
Add a test to exercise the use of s_server with "-cert_chain" to
construct an ocsp request.
This new functionality was added in PR #22192.
Testing:
make V=1 TESTS='test_ocsp_cert_chain' test
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23101)
Alexandr Nedvedicky [Fri, 8 Mar 2024 10:21:18 +0000 (11:21 +0100)]
Limit the number of http headers when receiving the http response
Change introduces a default limit on HTTP headers we expect to receive
from server to 256. If limit is exceeded http client library indicates
HTTP_R_RESPONSE_TOO_MANY_HDRLINES error. Application can use
OSSL_HTTP_REQ_CTX_set_max_response_hdr_lines() to change default.
Setting limit to 0 implies no limit (current behavior).
Fixes #22264
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23781)
Jiasheng Jiang [Wed, 6 Mar 2024 16:08:06 +0000 (16:08 +0000)]
Add check for xor_get_aid()
Add check for the return value of xor_get_aid() in order to avoid NULL pointer deference.
For example, "algor" could be NULL if the allocation of X509_ALGOR_new() fails. As a result, i2d_X509_ALGOR() will return 0 and "ctx->aid" will be an invalid value NULL.
Fixes: f4ed6eed2c ("SSL_set1_groups_list(): Fix memory corruption with 40 groups and more")
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23764)
olszomal [Thu, 8 Feb 2024 13:30:22 +0000 (14:30 +0100)]
Improve the documentation on -cert_chain and -status_verbose options
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22192)
olszomal [Fri, 5 Jan 2024 12:41:59 +0000 (13:41 +0100)]
Use the untrusted certificate chain to create a valid certificate ID for OCSP_request
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22192)
谭九鼎 [Sun, 10 Mar 2024 02:18:05 +0000 (02:18 +0000)]
Doc: fix style
CLA: trivial
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23805)
Jiasheng Jiang [Mon, 4 Mar 2024 17:34:02 +0000 (17:34 +0000)]
PKCS7: Remove one of the duplicate checks
There are two consecutive identical checks "if (i <= 0)".
We can remove one of them to make the code clear.
CLA: trivial
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23741)
Aarni Koskela [Tue, 5 Mar 2024 10:52:34 +0000 (12:52 +0200)]
Add reformatting commit to .git-blame-ignore-revs
CLA: trivial
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23748)
slontis [Tue, 27 Feb 2024 02:34:49 +0000 (13:34 +1100)]
Make the generated params_idx.c file deterministic if run multiple
times.
Fixes #23672
There are many name/value pairs currently that have duplicate names e.g.
'CAPABILITY_TLS_GROUP_MAX_TLS' => "tls-max-tls",
'CAPABILITY_TLS_SIGALG_MAX_TLS' => "tls-max-tls",
Stripping the .pm file down to just the above entries and running
multiple times gives different results for the produce_decoder.
On multiple runs any iterations over the unordered hash table keys using
foreach my $name (keys %params) results in a different order on multiple
runs. Because of this the mapping from the hash 'value' back to the
'key' will be different.
Note that the code also uses another mechanism in places that uses
"name1" => "value"
"name2" => "*name1"
Rather than fix all the strings the change done was to sort the keys. If
we were to chose to fix the strings then the perl code should be changed
to detect duplicates.
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23688)
Alexandr Nedvedicky [Fri, 1 Mar 2024 07:25:19 +0000 (08:25 +0100)]
FAQ.md should be removed
the page the link refers to does not exist.
Anyone objects to delete file?
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23719)
slontis [Mon, 4 Mar 2024 02:08:08 +0000 (13:08 +1100)]
Fix BIO_get_new_index() to return an error when it is exhausted.
Fixes #23655
BIO_get_new_index() returns a range of 129..255.
It is set to BIO_TYPE_START (128) initially and is incremented on each
call.
>= 256 is reserved for the class type flags (BIO_TYPE_DESCRIPTOR) so it
should error if it reaches the upper bound.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23732)
Neil Horman [Fri, 8 Mar 2024 20:06:33 +0000 (15:06 -0500)]
Bring SSL_group_to_name docs in line with API definition
docs say the SSL object in this function is const, but the api doesn't
qualify it as such. Adjust the docs to match the definition
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23785)
Hugo Landau [Wed, 14 Feb 2024 09:26:37 +0000 (09:26 +0000)]
Add CHANGES
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23584)
Hugo Landau [Wed, 14 Feb 2024 09:09:54 +0000 (09:09 +0000)]
QUIC MULTISTREAM TEST: Test write buffer statistics queries
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23584)
Hugo Landau [Wed, 14 Feb 2024 08:44:36 +0000 (08:44 +0000)]
QUIC: Add stream write buffer queries
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23584)
Bernd Edlinger [Wed, 28 Feb 2024 06:14:08 +0000 (07:14 +0100)]
Try to fix intermittent CI failures in sslapitest
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23705)
Hugo Landau [Thu, 15 Feb 2024 09:23:56 +0000 (09:23 +0000)]
QLOG: Fix indentation
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23598)
Hugo Landau [Thu, 15 Feb 2024 09:14:41 +0000 (09:14 +0000)]
QUIC: Define error code for stateless reset
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23598)
Hugo Landau [Thu, 15 Feb 2024 09:03:26 +0000 (09:03 +0000)]
QUIC: Add documentation for QUIC error codes
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23598)
Hugo Landau [Thu, 15 Feb 2024 08:55:36 +0000 (08:55 +0000)]
QUIC: Uniform changes for QUIC error code definitions rename
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23598)
Hugo Landau [Thu, 15 Feb 2024 08:55:24 +0000 (08:55 +0000)]
QUIC: Make QUIC transport error codes public
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23598)
Bernd Edlinger [Fri, 23 Feb 2024 11:04:38 +0000 (12:04 +0100)]
Dont run the self-hosted workflows when not available
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23678)
Neil Horman [Tue, 5 Mar 2024 15:56:35 +0000 (10:56 -0500)]
Gate setting of ipi_spec_dst on not building for freebsd
some variants of FreeBSD (notably Dells OneFS) implement IP_PKTINFO
partially, and as such the build breaks for those variants.
specifically, it supports IP_PKTINFO, but the in_pktinfo struct has no
defined ipi_spec_dst field. Work around this by gating the setting of
that variable on not building for FreeBSD
Fixes #23739
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23753)
Stanislav Zidek [Fri, 1 Mar 2024 14:33:30 +0000 (15:33 +0100)]
interop tests: Fedora 39 config, simplify updates
Imitating Fedora 39 configuration in openssl.cnf with
SECLEVEL lowered to 0 in order to be able to run
TLS 1.3 tests with TLS_AES_128_CCM_8_SHA256.
In order to make updating smoother, check out specific tag rather
than the branch. This way, "old" tests can be fetched until PR
pointing to "new" tests is merged, so backwards-incompatible
changes can be done when needed.
Files specific for openssl upstream moved to separate
directory.
CLA: trivial
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23747)
Dmitry Belyavskiy [Tue, 27 Feb 2024 14:22:58 +0000 (15:22 +0100)]
Fix a memory leak on successful load of CRL
Fixes #23693
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23695)
Hugo Landau [Mon, 4 Mar 2024 22:56:45 +0000 (22:56 +0000)]
QUIC QLOG: Fix ANSI
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23744)
Hugo Landau [Mon, 4 Mar 2024 22:55:51 +0000 (22:55 +0000)]
QUIC QLOG: Fix use of sprintf
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23744)
Hugo Landau [Mon, 4 Mar 2024 22:49:54 +0000 (22:49 +0000)]
Enable qlog support by default
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23744)
Tomas Mraz [Thu, 14 Dec 2023 17:04:58 +0000 (18:04 +0100)]
Document that unknown groups and sigalgs marked with ? are ignored
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23050)
Tomas Mraz [Thu, 14 Dec 2023 16:47:43 +0000 (17:47 +0100)]
Add test for ignoring unknown sigalgs and groups marked with ?
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23050)
Tomas Mraz [Thu, 14 Dec 2023 16:08:56 +0000 (17:08 +0100)]
Allow ignoring unknown sigalgs and groups in the configuration
Related to #20789
Signature algorithms and groups in the configuration that are
preceded with ? character and are unknown to libssl are just ignored.
The handling for them is similar to handling of ciphers.
I.e., there should be a failure only in case the configuration produces
no valid sigalgs or groups.
Also ignore duplicate sigalgs and groups as such confiuration errors
should not be fatal.
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23050)
Dr. David von Oheimb [Fri, 4 Aug 2023 15:05:20 +0000 (17:05 +0200)]
apps/cmp: improve -reqin option to read fallback public key from first request message file given
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/21660)
Dr. David von Oheimb [Fri, 4 Aug 2023 19:45:07 +0000 (21:45 +0200)]
crypto/cmp: add OSSL_CMP_MSG_get0_certreq_publickey(); fix coding style nit
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/21660)
Dr. David von Oheimb [Fri, 4 Aug 2023 09:47:17 +0000 (11:47 +0200)]
apps/cmp: extend documentation and diagnostics for using -reqin in special situations
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/21660)
Dr. David von Oheimb [Thu, 3 Aug 2023 14:55:35 +0000 (16:55 +0200)]
apps/cmp: add -reqout_only option for dumping/saving just the initial CMP request message
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/21660)
Dr. David von Oheimb [Fri, 4 Aug 2023 19:54:29 +0000 (21:54 +0200)]
apps/cmp.c: refactor to fix some coding style nits and more convenient source-level debugging
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/21660)
Dr. David von Oheimb [Wed, 17 Jan 2024 17:32:46 +0000 (18:32 +0100)]
cmperr.h: use free reason value 106 rather than 197 for CMP_R_UNEXPECTED_SENDER
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/21660)
Neil Horman [Thu, 29 Feb 2024 17:01:31 +0000 (12:01 -0500)]
Dump out qlog json if it is malformed
We're still seeing periodic failures in qlog from malformed json output,
so lets try to catch it.
Modify the verify-qlog.py script to, in the event of an exception in
json.loads, to replay the entire json file to the console, followed by
an exception indicating what line it died trying to parse.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23715)
pohsingwu [Sun, 28 Jan 2024 10:18:02 +0000 (18:18 +0800)]
Implement PCT for EDDSA
According to FIPS 140-3 IG 10.3.A Additonal Comment 1, a PCT shall be
performed consistent with the intended use of the keys.
This commit implements PCT for EDDSA via performing sign and verify
operations after key generated.
Also use the same pairwise test logic in EVP_PKEY_keygen and
EVP_PKEY_pairwise_check for EDDSA in FIPS_MODULE.
Add OSSL_SELF_TEST_DESC_PCT_EDDSA to OSSL_PROVIDER-FIPS page.
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23408)
Alexandr Nedvedicky [Thu, 15 Feb 2024 11:07:26 +0000 (12:07 +0100)]
demos/http3: Use `SSL_write_ex2()` together with `SSL_WRITE_FLAG_CONCLUDE`
These calls were introduced by PR #23343.
Change also does a minor tweak to Makefile so CFLAGS and LDFLAGS variables
from the environment are respected.
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23602)
shridhar kalavagunta [Sat, 27 Jan 2024 03:10:32 +0000 (21:10 -0600)]
Fix off by one issue in buf2hexstr_sep()
Fixes #23363
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23404)
Michael [Fri, 9 Feb 2024 22:45:00 +0000 (23:45 +0100)]
Improve documentation of standard IANA cipher suite names.
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23539)
Job Snijders [Wed, 21 Feb 2024 21:26:50 +0000 (21:26 +0000)]
Add appropriate lower bound checks for GeneralizedTime and UTCTime
ITU-T X.690 / ISO/IEC 8825-1 section 11.7 and section 11.8
impose specific constraints on how GeneralizedTime and UTCTime
can be encoded in BER/CER/DER. Following from these constraints
a minimum length can be derived.
Checking the length in this context can potentially help prevent
applications from interpreting an invalid GeneralizedTime as a
valid UTCTime.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23483)
Martin Oliveira [Fri, 9 Feb 2024 21:31:27 +0000 (14:31 -0700)]
apps/engine: add EC to list of capabilities
openssl engine -c wasn't showing if an engine implemented EC
cla: trivial
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23538)
Hamilton Chapman [Wed, 21 Feb 2024 13:47:19 +0000 (13:47 +0000)]
Ensure `$(MAKE)` commands and `CFLAGS` are appropriately quoted in the Makefile.
If a user's `make` command came from a path that contained a space then both the
`$(MAKE)` variable (and parts of the generated `CFLAGS`, when building for iOS)
would not be properly quoted and the build would fail.
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23663)
Tom Cosgrove [Wed, 21 Feb 2024 09:11:20 +0000 (09:11 +0000)]
Apply the AES-GCM unroll8 optimisation to Microsoft Azure Cobalt 100
Performance improvements range from 18% to 32%.
Change-Id: Ifb89eeac3c0625a582a25ff07cf7f9c9ec8f5ba6
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23651)
响马 [Sat, 17 Feb 2024 22:57:57 +0000 (06:57 +0800)]
chachap10-ppc.pl: Fix truncated relocation
Fix error: relocation truncated to fit: R_PPC64_REL14 (stub)
against symbol `ChaCha20_ctr32_vsx_8x'
CLA: trivial
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23618)
Michael Baentsch [Mon, 19 Feb 2024 05:41:35 +0000 (06:41 +0100)]
SSL_set1_groups_list(): Fix memory corruption with 40 groups and more
Fixes #23624
The calculation of the size for gid_arr reallocation was wrong.
A multiplication by gid_arr array item size was missing.
Testcase is added.
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23625)
MrRurikov [Wed, 21 Feb 2024 08:11:34 +0000 (11:11 +0300)]
s_cb.c: Add missing return value checks
Return value of function 'SSL_CTX_ctrl', that is called from
SSL_CTX_set1_verify_cert_store() and SSL_CTX_set1_chain_cert_store(),
is not checked, but it is usually checked for this function.
CLA: trivial
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23647)
(cherry picked from commit
6f794b461c6e16c8afb996ee190e084cbbddb6b8)
Tomas Mraz [Tue, 20 Feb 2024 17:42:24 +0000 (18:42 +0100)]
Minor wording fixes related to no-atexit
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23642)
(cherry picked from commit
66e6f72c3e4221580a7f456ddeaa5027f0bbb8b7)
Matt Caswell [Tue, 20 Feb 2024 15:11:26 +0000 (15:11 +0000)]
Don't print excessively long ASN1 items in fuzzer
Prevent spurious fuzzer timeouts by not printing ASN1 which is excessively
long.
This fixes a false positive encountered by OSS-Fuzz.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23640)
Ijtaba Hussain [Fri, 9 Jun 2023 06:04:53 +0000 (11:04 +0500)]
Extended SSL_SESSION functions using time_t
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21206)
Frederik Wedel-Heinen [Fri, 16 Feb 2024 10:44:01 +0000 (11:44 +0100)]
Future proof RLAYER_USE_EXPLICIT_IV by checking dtls versions directly.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23611)
Bernd Ritter [Sat, 17 Feb 2024 18:15:14 +0000 (19:15 +0100)]
Correct the defined name of the parameter "micalg" in the documentation
The EVP_DigestInit(3) manual page contains wrong name for the define
macro for the OSSL_DIGEST_PARAM_MICALG param.
Fixes #23580
CLA: trivial
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23615)
Hugo Landau [Wed, 14 Feb 2024 10:06:45 +0000 (10:06 +0000)]
Minor updates
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Mon, 12 Feb 2024 11:31:18 +0000 (11:31 +0000)]
Fix warning
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Mon, 12 Feb 2024 10:06:23 +0000 (10:06 +0000)]
JSON_ENC: Ensure ossl_json_flush() really flushes the BIO
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Mon, 12 Feb 2024 09:50:59 +0000 (09:50 +0000)]
QUIC CHANNEL: Defer QLOG instantiation until first event
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Mon, 12 Feb 2024 09:50:42 +0000 (09:50 +0000)]
QUIC TXP: Allow QLOG instance retrieval via callback
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Mon, 12 Feb 2024 09:49:58 +0000 (09:49 +0000)]
QUIC QTX: Allow QLOG instance retrieval via callback
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Mon, 12 Feb 2024 09:49:32 +0000 (09:49 +0000)]
QUIC FIFD: Allow QLOG instance retrieval via callback
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Fri, 9 Feb 2024 14:22:51 +0000 (14:22 +0000)]
Add entry to CHANGES.md
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Fri, 9 Feb 2024 14:08:52 +0000 (14:08 +0000)]
QUIC MULTISTREAM TEST: Test explicit event handling mode
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Fri, 9 Feb 2024 12:52:49 +0000 (12:52 +0000)]
QUIC APL: Add implementation of SSL_VALUE_EVENT_HANDLING_MODE
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Fri, 9 Feb 2024 12:52:33 +0000 (12:52 +0000)]
QUIC: Add API for SSL_VALUE_EVENT_HANDLING_MODE
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Hugo Landau [Fri, 9 Feb 2024 12:52:09 +0000 (12:52 +0000)]
QUIC: Add docs for SSL_VALUE_EVENT_HANDLING_MODE
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)
Shakti Shah [Tue, 13 Feb 2024 19:03:19 +0000 (00:33 +0530)]
OpenSSL License is applied for some source files, change to Apache 2
The following files
include/openssl/hpke.h
crypto/hpke/hpke.c
crypto/ec/asm/ecp_sm2p256-armv8.pl
crypto/chacha/asm/chacha-loongarch64.pl
still seem to be released under the OpenSSL License instead of the Apache 2 license.
Fixes #23570
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23576)
Marcel Gosmann [Wed, 14 Feb 2024 10:35:47 +0000 (11:35 +0100)]
Fixed Visual Studio 2008 compiler errors
CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23586)
Frederik Wedel-Heinen [Tue, 13 Feb 2024 12:21:52 +0000 (13:21 +0100)]
Removes record_queue struct which is no longer useful.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23571)
Hugo Landau [Wed, 14 Feb 2024 08:08:01 +0000 (08:08 +0000)]
QUIC: Test that SSL_ctrl, SSL_set_mode are routed correctly on QSSOs
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23581)
Hugo Landau [Wed, 14 Feb 2024 08:04:12 +0000 (08:04 +0000)]
QUIC: Fix SSL_ctrl operation for QSSOs
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23581)
Neil Horman [Sat, 16 Dec 2023 20:32:48 +0000 (15:32 -0500)]
Check for NULL cleanup function before using it in encoder_process
encoder_process assumes a cleanup function has been set in the currently
in-use encoder during processing, which can lead to segfaults if said
function hasn't been set
Add a NULL check for this condition, returning -1 if it is not set
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23069)
Hugo Landau [Tue, 13 Feb 2024 11:33:08 +0000 (11:33 +0000)]
Add CHANGES: Fixed SSL_export_keying_material for QUIC.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23567)
(cherry picked from commit
a2ccaa666545c4c8dd501e6739d88b4e4d9199be)
Hugo Landau [Tue, 13 Feb 2024 11:29:53 +0000 (11:29 +0000)]
Fix SSL_export_keying_material for QUIC
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23567)
(cherry picked from commit
498d4e4c4f4a1e220cfa64cfcc76174e2f656fd0)
Neil Horman [Thu, 8 Feb 2024 14:17:44 +0000 (09:17 -0500)]
Skip shlibload tests if no-atexit is configured
the shared library load tests fail if no-atexit is configured. The
entire test suite relies on atexit handling to indicate an at exit
handler has run, by producing a file that the test recipe then reads.
With no-atexit that never happens, and the test fails
If no-atexit is specified, skip all the tests
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23523)
Shakti Shah [Sat, 10 Feb 2024 19:39:10 +0000 (01:09 +0530)]
KDF_CTX_new API has incorrect signature (const should not be there)
https://www.openssl.org/docs/man3.1/man3/EVP_KDF_CTX.html
The pages for 3.0/3.1/master seem to have the following
EVP_KDF_CTX *EVP_KDF_CTX_new(const EVP_KDF *kdf);
which does not match with the actual header which is
EVP_KDF_CTX *EVP_KDF_CTX_new(EVP_KDF *kdf);
Fixes #23532
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23541)
Dimitri Papadopoulos [Mon, 12 Feb 2024 20:22:30 +0000 (21:22 +0100)]
Fix the grammar as suggsted in the review
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23545)
Dimitri Papadopoulos [Sun, 11 Feb 2024 17:14:30 +0000 (18:14 +0100)]
Fix new typos found by codespell
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23545)
Dr. David von Oheimb [Wed, 7 Feb 2024 07:53:17 +0000 (08:53 +0100)]
test_cmp_http: decrease risk of timeouts due to delays caused by the underlying system running tests
Fixes #22870
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23502)
Tomas Mraz [Mon, 12 Feb 2024 09:59:27 +0000 (10:59 +0100)]
os-zoo.yml: Do not add enable-unstable-qlog as this CI tests all branches
The enable-unstable-qlog is enabled in windows.yml,
which is sufficient for testing it on Windows.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23550)
Hugo Landau [Fri, 9 Feb 2024 10:27:53 +0000 (10:27 +0000)]
Fix nit
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23495)