openssl.git
2 years agocmp_client_test.c: Remove needless dependency on NDEBUG
Dr. David von Oheimb [Mon, 12 Jul 2021 13:30:20 +0000 (15:30 +0200)]
cmp_client_test.c: Remove needless dependency on NDEBUG

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16052)

2 years agoFIPS and KTLS may interfere
Dmitry Belyavskiy [Wed, 22 Sep 2021 14:40:13 +0000 (16:40 +0200)]
FIPS and KTLS may interfere

New Linux kernels (>= 5.11) enable KTLS CHACHA which is not
FIPS-suitable.

Fixes #16657

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16658)

2 years agoUpdate 15-ios.conf
Dominic Letz [Wed, 22 Sep 2021 16:03:28 +0000 (18:03 +0200)]
Update 15-ios.conf

CLA: trivial

I assume this has been an error in the initial ios conf file. In order to build for ios the shared engine library, needs to be disabled because iOS doesn't have the concept of shared libraries. But instead of only disabling `dynamic-engine` (or like in this commit disabled the `shared`) option the previous config did disable `engine` and with that the `static-engine` compilation as well. This restores the `static-engine` option being enabled by default, but keeping compilation going on iOS.

Cheers!

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/16659)

2 years agotls/ccm8: reduce the cipher strength for CCM8 ciphers to 64 bits
Pauli [Thu, 23 Sep 2021 02:27:11 +0000 (12:27 +1000)]
tls/ccm8: reduce the cipher strength for CCM8 ciphers to 64 bits

This is the length of the tag they use and should be considered an upper bound
on their strength.

This lowers their security strength to level 0.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16652)

2 years agodoc: document the change to the security level of CCM8 cipher suites
Pauli [Wed, 22 Sep 2021 00:32:49 +0000 (10:32 +1000)]
doc: document the change to the security level of CCM8 cipher suites

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16652)

2 years agotls: reduce the strength of CCM_8 ciphers due to their short IV.
Pauli [Wed, 22 Sep 2021 00:31:22 +0000 (10:31 +1000)]
tls: reduce the strength of CCM_8 ciphers due to their short IV.

Fixes #16154

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16652)

2 years agoChange TLS RC4 cipher strength check to be data driven.
slontis [Wed, 22 Sep 2021 05:53:54 +0000 (15:53 +1000)]
Change TLS RC4 cipher strength check to be data driven.

This is a same pattern as used in PR #16652

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16656)

2 years agoExplicitly #include <synchapi.h> is unnecessary
Kelvin Lee [Tue, 14 Sep 2021 07:55:50 +0000 (17:55 +1000)]
Explicitly #include <synchapi.h> is unnecessary

The header is already included by <windows.h> for WinSDK 8 or later.
Actually this causes problem for WinSDK 7.1 (defaults for VS2010) that
it does not have this header while SRW Locks do exist for Windows 7.

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16603)

2 years agoincrease x509 code coverage metrics
Tavis Ormandy [Tue, 21 Sep 2021 22:48:27 +0000 (15:48 -0700)]
increase x509 code coverage metrics

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16651)

2 years agoAdd default provider support for Keccak 224, 256, 384 and 512
Ulrich Müller [Mon, 13 Sep 2021 10:59:42 +0000 (12:59 +0200)]
Add default provider support for Keccak 224, 256, 384 and 512

Fixes issue openssl#13033

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16594)

2 years agodoc: Fix include syntax
Pauli [Tue, 21 Sep 2021 08:48:17 +0000 (18:48 +1000)]
doc: Fix include syntax

Internal headers should be included using "" instead of <>.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16647)

2 years agoRemove extra comma in man page example code
Mattias Ellert [Tue, 21 Sep 2021 04:56:36 +0000 (06:56 +0200)]
Remove extra comma in man page example code

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16643)

2 years agorand: don't free an mis-set pointer on error
Pauli [Mon, 20 Sep 2021 23:19:35 +0000 (09:19 +1000)]
rand: don't free an mis-set pointer on error

This is adding robustness to the code.  The fix to not mis-set the pointer
is in #16636.

Fixes #16631

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/16640)

2 years agodoc: remove end of line whitespace
Pauli [Tue, 21 Sep 2021 00:59:56 +0000 (10:59 +1000)]
doc: remove end of line whitespace

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/16641)

2 years agoAvoid double-free on unsuccessful getting PRNG seeding
Dmitry Belyavskiy [Mon, 20 Sep 2021 14:35:10 +0000 (16:35 +0200)]
Avoid double-free on unsuccessful getting PRNG seeding

Fixes #16631

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16636)

2 years agoUpdate the default value for the -nameopt option - documentation
Dmitry Belyavskiy [Fri, 17 Sep 2021 15:49:39 +0000 (17:49 +0200)]
Update the default value for the -nameopt option - documentation

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16583)

2 years agoNEWS and CHANGES are updated about switching to utf8
Dmitry Belyavskiy [Fri, 17 Sep 2021 15:47:55 +0000 (17:47 +0200)]
NEWS and CHANGES are updated about switching to utf8

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16583)

2 years agoTests adjustments for default output change
Dmitry Belyavskiy [Mon, 13 Sep 2021 17:24:24 +0000 (19:24 +0200)]
Tests adjustments for default output change

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16583)

2 years agoUpdate gost-engine to match new default nameopt
Dmitry Belyavskiy [Thu, 16 Sep 2021 15:47:47 +0000 (17:47 +0200)]
Update gost-engine to match new default nameopt

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16583)

2 years agoUse -nameopt utf8 by default
Dmitry Belyavskiy [Sat, 11 Sep 2021 11:56:28 +0000 (13:56 +0200)]
Use -nameopt utf8 by default

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16583)

2 years agoFix util/mkpod2html.pl to call pod2html with absolute paths
Richard Levitte [Sun, 19 Sep 2021 09:05:35 +0000 (11:05 +0200)]
Fix util/mkpod2html.pl to call pod2html with absolute paths

It turns out that on VMS, pod2html only recognises VMS directory
specifications if they contain a device name, which is accomplished by
making them absolute.  Otherwise, a VMS build that includes building
the document HTML files ends up with an error like this:

    $ perl [---.downloads.openssl-3_0-snap-20210916.util]mkpod2html.pl -i [---.downloads.openssl-3_0-snap-20210916.doc.man1]CA.pl.pod -o [.DOC.HTML.MAN1]CA.PL.HTML -t "CA.pl" -r "[---.downloads.openssl-3_0-snap-20210916.doc]"
    [---.downloads.openssl-3_0-snap-20210916.util]mkpod2html.pl: error changing to directory -/-/-/downloads/openssl-3_0-snap-20210916/doc/: no such file or directory
    %SYSTEM-F-ABORT, abort

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16626)

2 years agoci: add copyright header to CI scripts
Pauli [Sun, 19 Sep 2021 23:54:10 +0000 (09:54 +1000)]
ci: add copyright header to CI scripts

There is quite a bit of creative effort in these and even more trouble-
shooting effort.  I.e. they are non-trivial from a copyright perspective.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16628)

2 years agoAdd missing mention of mandatory function OSSL_FUNC_keymgmt_has
Arne Schwabe [Sat, 18 Sep 2021 03:04:39 +0000 (05:04 +0200)]
Add missing mention of mandatory function OSSL_FUNC_keymgmt_has

The manual page provider-keymgmt.pod is missing the mention of the
required function OSSL_FUNC_keymgmt_has. The function
keymgmt_from_algorithm raise EVP_R_INVALID_PROVIDER_FUNCTIONS
if keymgmt->has == NULL

CLA: trivial
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16621)

(cherry picked from commit 56b8f434c7da35b4de16603faad4170eb1d80710)

2 years agoDocument that the openssl fipsinstall self test callback may not be used.
slontis [Tue, 31 Aug 2021 00:59:20 +0000 (10:59 +1000)]
Document that the openssl fipsinstall self test callback may not be used.

Fixes #16260

If the user autoloads a fips module from a config file, then it will run the self tests early (before the self test callback is set),
and they may not get triggered again during the fipsinstall process.
In order for this to happen there must already be a valid fips config file.
As the main purpose of the application is to generate the fips config file, this case has just been documented.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16475)

2 years agoapps/s_client: Add ktls option
Tianjia Zhang [Wed, 15 Sep 2021 03:00:50 +0000 (11:00 +0800)]
apps/s_client: Add ktls option

From openssl-3.0.0-alpha15, KTLS is turned off by default, even if
KTLS feature in compilation, which makes it difficult to use KTLS
through s_server/s_client, so a parameter option 'ktls' is added
to enable KTLS through cmdline.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16609)

2 years agoapps/s_server: Add ktls option
Tianjia Zhang [Wed, 15 Sep 2021 03:39:51 +0000 (11:39 +0800)]
apps/s_server: Add ktls option

From openssl-3.0.0-alpha15, KTLS is turned off by default, even if
KTLS feature in compilation, which makes it difficult to use KTLS
through s_server/s_client, so a parameter option 'ktls' is added
to enable KTLS through cmdline.

At the same time, SSL_sendfile() depends on KTLS feature to work
properly, make parameters sendfile depend on parameters ktls.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16609)

2 years agoConfigurations/platform/Unix.pm: account for variants in sharedlib_simple()
Richard Levitte [Wed, 15 Sep 2021 07:11:41 +0000 (09:11 +0200)]
Configurations/platform/Unix.pm: account for variants in sharedlib_simple()

OpenSSL 1.1.1 links the simple libcrypto.so to libcrypto_variant.so,
this was inadvertently dropped.

Fixes #16605

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16608)

2 years agoFix the parameter type of gf_serialize
Bernd Edlinger [Sun, 22 Aug 2021 19:28:51 +0000 (21:28 +0200)]
Fix the parameter type of gf_serialize

It is better to use array bounds for improved
gcc warning checks.

While "uint8_t*" allows arbitrary pointer arithmetic
using "uint8_t[SER_BYTES]" limits the pointer arithmetic
to the range 0..SER_BYTES.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16376)

2 years agoClarify what SSL_get_session() does on the server side in TLSv1.3
Matt Caswell [Sat, 11 Sep 2021 09:02:21 +0000 (10:02 +0100)]
Clarify what SSL_get_session() does on the server side in TLSv1.3

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16582)

2 years agoCorrect the documentation for SSL_set_num_tickets()
Matt Caswell [Sat, 11 Sep 2021 08:58:52 +0000 (09:58 +0100)]
Correct the documentation for SSL_set_num_tickets()

The behaviour for what happens in a resumption connection was not quite
described correctly.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16582)

2 years agoAPPS/cmp.c: Move warning on overlong section name to make it effective again
Dr. David von Oheimb [Sat, 11 Sep 2021 21:08:13 +0000 (23:08 +0200)]
APPS/cmp.c: Move warning on overlong section name to make it effective again

Fixes #16585

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16586)

2 years agoproviders: Do not use global EVP_CIPHERs and EVP_MDs
Tomas Mraz [Tue, 14 Sep 2021 07:34:32 +0000 (09:34 +0200)]
providers: Do not use global EVP_CIPHERs and EVP_MDs

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16600)

2 years ago80-test_cmp_http.t: Fix handling of empty HTTP proxy string
Dr. David von Oheimb [Mon, 13 Sep 2021 06:14:58 +0000 (08:14 +0200)]
80-test_cmp_http.t: Fix handling of empty HTTP proxy string

Fixes #16546

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16593)

2 years agoMacOS prior to 10.12 does not support random API correctly
lprimak [Mon, 13 Sep 2021 01:21:30 +0000 (20:21 -0500)]
MacOS prior to 10.12 does not support random API correctly

Fixes #16517

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16592)

2 years agoconvert tabs to spaces in two distributed Perl scripts
Viktor Szakats [Sun, 29 Aug 2021 00:59:09 +0000 (00:59 +0000)]
convert tabs to spaces in two distributed Perl scripts

Also fix indentation in c_rehash.in to 4 spaces, where a mixture of 4 and 8
spaces was used before, in addition to tabs.

CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16459)

2 years agoFix the build file templates where uplink matters
Richard Levitte [Fri, 10 Sep 2021 04:42:24 +0000 (06:42 +0200)]
Fix the build file templates where uplink matters

We changed the manner in which a build needing applink is detected,
but forgot to change the installation targets accordingly.

Fixes #16570

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16577)

(cherry picked from commit de36ce47bf9858f3c517345f46e52d5a6fc506de)

2 years agolinux-x86-clang target: Add -latomic
Tomas Mraz [Fri, 10 Sep 2021 08:45:01 +0000 (10:45 +0200)]
linux-x86-clang target: Add -latomic

Fixes #16572

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16578)

2 years agoFix nc_email to check ASN1 strings with NULL byte in the middle
Nikita Ivanov [Tue, 7 Sep 2021 08:31:17 +0000 (11:31 +0300)]
Fix nc_email to check ASN1 strings with NULL byte in the middle

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16524)

2 years agoopenssl-x509.pod.in: Reflect better that -signkey is an alias for -key option
Dr. David von Oheimb [Wed, 25 Aug 2021 10:30:09 +0000 (12:30 +0200)]
openssl-x509.pod.in: Reflect better that -signkey is an alias for -key option

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16440)

2 years agoAPPS/{x509,req}: Fix description and diagnostics of -key, -in, etc. options
Dr. David von Oheimb [Fri, 27 Aug 2021 05:11:36 +0000 (07:11 +0200)]
APPS/{x509,req}: Fix description and diagnostics of -key, -in, etc. options

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16440)

2 years agoinstall_fips: Create the OPENSSLDIR as it might not exist
Tomas Mraz [Thu, 9 Sep 2021 07:19:58 +0000 (09:19 +0200)]
install_fips: Create the OPENSSLDIR as it might not exist

Fixes #16564

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16569)

2 years agoFix 'openssl speed' information printout
Richard Levitte [Wed, 8 Sep 2021 19:58:19 +0000 (21:58 +0200)]
Fix 'openssl speed' information printout

Most of all, this reduces the following:

    built on: built on: Wed Sep  8 19:41:55 2021 UTC

to:

    built on: Wed Sep  8 19:41:55 2021 UTC

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/16563)

(cherry picked from commit c1dc3536a89d71f8545f3c70bee2332f389a871d)

2 years agoVMS: Fix descrip.mms template
Richard Levitte [Wed, 8 Sep 2021 18:16:37 +0000 (20:16 +0200)]
VMS: Fix descrip.mms template

away the use of $(DEFINES), which does get populated with defines
given through configuration.  This makes it impossible to configure
with extra defines on VMS.  Uncommenting and moving $(DEFINES) to a
more proper spot gives the users back that ability.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16561)

(cherry picked from commit 1dc15a3330434ef1f79921a2d97c585048dcf05e)

2 years agodh_ameth: Fix dh_cmp_parameters to really compare the params
Tomas Mraz [Thu, 9 Sep 2021 07:12:22 +0000 (09:12 +0200)]
dh_ameth: Fix dh_cmp_parameters to really compare the params

This is legacy DH PKEY only code.

Fixes #16562

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16568)

2 years agoFixed state transitions for the HTML version of the life_cycle-kdf.pod.
astraujums [Wed, 8 Sep 2021 12:55:39 +0000 (15:55 +0300)]
Fixed state transitions for the HTML version of the life_cycle-kdf.pod.
The MAN version was fine and so are kdf.dot and lifecycles.ods from doc/life-cycles

CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16559)

2 years agoOpenSSL::Ordinals::set_version() should only be given the short version
Richard Levitte [Wed, 8 Sep 2021 07:40:37 +0000 (09:40 +0200)]
OpenSSL::Ordinals::set_version() should only be given the short version

This function tried to shave off the pre-release and build metadata
text from the the version number it gets, but didn't do that quite
right.  Since this isn't even a documented behaviour, the easier, and
arguably more correct path is for that function not to try to shave
off anything, and for the callers to feed it the short version number,
"{MAJOR}.{MINOR}.{PATCH}", nothing more.

The build file templates are adjusted accordingly.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16556)

2 years agoEnhance the srctop, bldtop, data and result functions to check the result
Richard Levitte [Tue, 7 Sep 2021 08:00:12 +0000 (10:00 +0200)]
Enhance the srctop, bldtop, data and result functions to check the result

This affects bldtop_dir, bldtop_file, srctop_dir, srctop_file,
data_dir, data_file, result_dir, and result_file.  They are all
enhanced to check that the resulting path really is a directory or a
file.  They only do this if the path exists.

This allows the tests to catch if these functions are used
incorrectly, even on systems where the syntax for directories and
files is the same.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16523)

2 years agoFix some documentation errors
PW Hu [Wed, 8 Sep 2021 01:13:20 +0000 (09:13 +0800)]
Fix some documentation errors

CLA: trivial

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16553)

2 years agoFix the example SSH KDF code.
Pauli [Tue, 7 Sep 2021 23:28:57 +0000 (09:28 +1000)]
Fix the example SSH KDF code.

A salt was being set instead of a session ID.

Fixes #16525

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16550)

2 years agoFix test/recipes/90-test_fipsload.t to use bldtop_file for the FIPS module
Richard Levitte [Tue, 7 Sep 2021 10:48:52 +0000 (12:48 +0200)]
Fix test/recipes/90-test_fipsload.t to use bldtop_file for the FIPS module

It used bldtop_dir(), which is incorrect for files.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16532)

2 years agoDOCS: Update the page for 'openssl passwd' to not duplicate some info
Richard Levitte [Tue, 7 Sep 2021 09:48:07 +0000 (11:48 +0200)]
DOCS: Update the page for 'openssl passwd' to not duplicate some info

The options -1 and -apr1 were mentioned in DESCRIPTION, not mentioning
any other options or even mentioning that there are more algorithms.
The simple fix is to remove that sentence and let the OPTIONS section
speak for itself.

Fixes #16529

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16531)

2 years agoSocket now displays what address it is connecting to
Zengit [Tue, 24 Aug 2021 02:06:04 +0000 (05:06 +0300)]
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)

2 years agocrypto/bio/bss_bio.c/bio_write: improve border check
PW Hu [Fri, 3 Sep 2021 09:50:40 +0000 (17:50 +0800)]
crypto/bio/bss_bio.c/bio_write: improve border check

CLA:trivial

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16503)

2 years agoUse '[option...]' not '[[ options ]]' in text
Rich Salz [Mon, 16 Aug 2021 21:31:59 +0000 (17:31 -0400)]
Use '[option...]' not '[[ options ]]' in text

Looks more like manpage format. :)
Also remove `{{..}}` notation and rewrite around it.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16329)

2 years agoUpdate copyright year
Richard Levitte [Tue, 7 Sep 2021 11:29:33 +0000 (13:29 +0200)]
Update copyright year

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16534)

(cherry picked from commit 54d987b92ce57c1cc38c6d9b6bf879b003f4cbd4)

2 years agoLast minute NEWS and CHANGES entries for the 3.0 release
Tomas Mraz [Tue, 7 Sep 2021 11:18:22 +0000 (13:18 +0200)]
Last minute NEWS and CHANGES entries for the 3.0 release

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16533)

2 years agoMention the concept of providers in NEWS.md and CHANGES.md
Richard Levitte [Tue, 7 Sep 2021 09:28:12 +0000 (11:28 +0200)]
Mention the concept of providers in NEWS.md and CHANGES.md

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16528)

(cherry picked from commit 4c4ab4d7efdf8c9b49c9838742a0fcd7321d88ff)

2 years agofix documentation error caused by commit 6882652e65d39310c98ba506ceb55a87c702d419
PW Hu [Fri, 3 Sep 2021 07:18:02 +0000 (15:18 +0800)]
fix documentation error caused by commit 6882652e65d39310c98ba506ceb55a87c702d419

CLA:trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16502)

2 years ago fix documentation error caused by commit 9067cf6ccdce0a73922f06937e54c2fce2752038
PW Hu [Fri, 3 Sep 2021 07:09:54 +0000 (15:09 +0800)]
 fix documentation error caused by commit 9067cf6ccdce0a73922f06937e54c2fce2752038

CLA:trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16502)

2 years ago imporve documentation
PW Hu [Fri, 3 Sep 2021 06:40:17 +0000 (14:40 +0800)]
 imporve documentation

CLA:trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16502)

2 years agoAdded a NEWS entry about the enhanced 'openssl list'
Richard Levitte [Tue, 7 Sep 2021 07:44:58 +0000 (09:44 +0200)]
Added a NEWS entry about the enhanced 'openssl list'

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16522)

(cherry picked from commit f43c1241c28526588f59e56c7f56422e0d23f411)

2 years agoAdd missing OSSL_DECODER entry in NEWS.md and CHANGES.md
Richard Levitte [Tue, 7 Sep 2021 07:33:16 +0000 (09:33 +0200)]
Add missing OSSL_DECODER entry in NEWS.md and CHANGES.md

The text in CHANGES.md got fleshed out a bit more as well.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16522)

(cherry picked from commit d1a786e99b162793a8f4a70fe12d2c4e6f5ee608)

2 years agoCorrect the "Out of memory" EVP tests
Richard Levitte [Tue, 7 Sep 2021 05:27:01 +0000 (07:27 +0200)]
Correct the "Out of memory" EVP tests

This affects test/recipes/30-test_evp_data/evpkdf_scrypt.txt and
test/recipes/30-test_evp_data/evppkey_kdf_scrypt.txt, where the "Out
of memory" stanza weren't up to the task, as they didn't hit the
default scrypt memory limit like they did in OpenSSL 1.1.1.

We solve this by setting the |n| value to the next power of two, and
correcting the expected result.

Fixes #16519

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16521)

(cherry picked from commit 437d4202212daae86b66ef776706d2e1a27a7953)

2 years agoFix a few tests that fail on VMS
Richard Levitte [Mon, 6 Sep 2021 19:49:34 +0000 (21:49 +0200)]
Fix a few tests that fail on VMS

In one spot, files aren't properly closed, so the sub-process program
that's supposed to read them can't, because it's locked out.

In another spot, srctop_file() was used where srctop_dir() should be
used to properly format a directory specification.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16518)

(cherry picked from commit 7364545e0734ad25e08d7d5ad0e2c9dac85d2d0d)

2 years agoConfiguration: support building for OpenVMS for x86_64
Richard Levitte [Mon, 26 Jul 2021 10:40:01 +0000 (12:40 +0200)]
Configuration: support building for OpenVMS for x86_64

OpenVMS for x86_64 is currently out on a field test.  Building
programs for it is currently done with cross compilation on Itanium.
The cross compilation tools are made available by running a script,
which makes cross-compilation variants of most commands available, and
adds the cross-compilation C compiler XCC.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16498)

2 years agotest/recipes/25-test_verify.t: Add a couple of tests of mixed PEM files
Richard Levitte [Fri, 3 Sep 2021 13:00:47 +0000 (15:00 +0200)]
test/recipes/25-test_verify.t: Add a couple of tests of mixed PEM files

Fixes #16224

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16466)

2 years agoENCODER PROV: Add encoders with EncryptedPrivateKeyInfo output
Richard Levitte [Wed, 1 Sep 2021 20:18:45 +0000 (22:18 +0200)]
ENCODER PROV: Add encoders with EncryptedPrivateKeyInfo output

Since EncryptedPrivateKeyInfo is a recognised structure, it's
reasonable to think that someone might want to specify it.

To be noted is that if someone specifies the structure PrivateKeyInfo
but has also passed a passphrase callback, the result will still
become a EncryptedPrivateKeyInfo structure.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16466)

2 years agoAdjust test/endecoder_test.c
Richard Levitte [Wed, 1 Sep 2021 15:34:38 +0000 (17:34 +0200)]
Adjust test/endecoder_test.c

The protected tests need to specify the structure EncryptedPrivateKeyInfo
rather than PrivateKeyInfo, since that's the outermost structure.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16466)

2 years agoOSSL_STORE 'file:' scheme: Set input structure for certificates and CRLs
Richard Levitte [Mon, 30 Aug 2021 11:22:18 +0000 (13:22 +0200)]
OSSL_STORE 'file:' scheme: Set input structure for certificates and CRLs

When the user expects to load a certificate or a CRL through the
OSSL_STORE loading function, the 'file:' implementation sets the
corresponding structure names in the internal decoder context.
This is especially geared for PEM files, which often contain a mix of
objects, and password prompting should be avoided for objects that
need them, but aren't what the caller is looking for.

Fixes #16224

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16466)

2 years agoPEM to DER decoder: Specify object type and data structure more consistently
Richard Levitte [Mon, 30 Aug 2021 11:19:30 +0000 (13:19 +0200)]
PEM to DER decoder: Specify object type and data structure more consistently

The data structure wasn't given for recognised certificates or CRLs.
It's better, though, to specify it for those objects as well, so they
can be used to filter what actually gets decoded, which will be
helpful for our OSSL_STORE 'file:' scheme implementation.

Fixes #16224

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16466)

2 years agoDECODER: check the first decoded structure name against user given structure
Richard Levitte [Mon, 30 Aug 2021 11:16:42 +0000 (13:16 +0200)]
DECODER: check the first decoded structure name against user given structure

In a chain of decoders, the first that specifies an input structure
gets it compared with the structure specified by the user, if there is
one.  If they aren't the same, that decoder is skipped.

Because the first structure can appear anywhere along a chain of
decoders, not just the decoders associated with the resulting OpenSSL
type, the code that checked the structure name when building up the
chain of decoders is removed.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16466)

2 years agoAdd KEM dupctx test
slontis [Thu, 2 Sep 2021 06:50:45 +0000 (16:50 +1000)]
Add KEM dupctx test

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16495)

2 years agoFix dh dupctx refcount error
slontis [Thu, 2 Sep 2021 06:49:37 +0000 (16:49 +1000)]
Fix dh dupctx refcount error

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16495)

2 years agoFix double free in EVP_PKEY_CTX_dup()
slontis [Thu, 2 Sep 2021 06:39:21 +0000 (16:39 +1000)]
Fix double free in EVP_PKEY_CTX_dup()

If the internal operations dupctx() fails then a free is done (e.g. EVP_KEYEXCH_free()). If this is not set to NULL the EVP_PKEY_CTX_free() will do a double free.
This was found by testing kdf_dupctx() in kdf_exch.c (Note this always
fails since the internal KDF's do not have a dup method).

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16495)

2 years agoEVP_PKEY_gettable_params.pod: Update argument names
PW Hu [Thu, 2 Sep 2021 04:02:06 +0000 (12:02 +0800)]
EVP_PKEY_gettable_params.pod: Update argument names

CLA: trivial

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16494)

2 years agoVMS: Compensate for x86_64 cross compiler type incompatibility
Richard Levitte [Thu, 2 Sep 2021 11:10:33 +0000 (13:10 +0200)]
VMS: Compensate for x86_64 cross compiler type incompatibility

The x86_64 cross compiler says that 'unsigned long long' isn't the
same as 'unsigned __int64'.  Sure, and considering that
providers/implementations/rands/seeding/rand_vms.c is specific VMS
only code, it's easy to just change the type to the exact same as
what's specified in the system headers.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16497)

(cherry picked from commit 1ef526ef421febe50a105bb140d7e3a70bd76b61)

2 years agoPrepare for 3.1
Richard Levitte [Tue, 31 Aug 2021 16:38:15 +0000 (18:38 +0200)]
Prepare for 3.1

Because we now have an openssl-3.0 branch, master is moved to be the
next potential minor version.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16484)

2 years agoTest for DANE cross cert fix
Viktor Dukhovni [Mon, 30 Aug 2021 19:09:43 +0000 (15:09 -0400)]
Test for DANE cross cert fix

Reviewed-by: Tomáš Mráz <tomas@openssl.org>
2 years agoPrioritise DANE TLSA issuer certs over peer certs
Viktor Dukhovni [Mon, 30 Aug 2021 18:17:16 +0000 (14:17 -0400)]
Prioritise DANE TLSA issuer certs over peer certs

When building the certificate chain, prioritise any Cert(0) Full(0)
certificates from TLSA records over certificates received from the peer.

This is important when the server sends a cross cert, but TLSA records include
the underlying root CA cert.  We want to construct a chain with the issuer from
the TLSA record, which can then match the TLSA records (while the associated
cross cert may not).

Reviewed-by: Tomáš Mráz <tomas@openssl.org>
2 years agorand: avoid using the derivation function for the public and private DRBGs
Pauli [Mon, 26 Jul 2021 06:11:34 +0000 (16:11 +1000)]
rand: avoid using the derivation function for the public and private DRBGs

There is no point using it becuase they are getting full quality entropy from
the primary DRBG (which remains using the d.f.).

Also cleaned up the parameter passing to the DRBGs to not pass parameters that
are unknown.

Fixes #16117

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16156)

2 years agoFix indentation of tls13_hkdf_expand parameters
Daniel Bevenius [Wed, 1 Sep 2021 09:45:45 +0000 (11:45 +0200)]
Fix indentation of tls13_hkdf_expand parameters

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16489)

2 years agoCI: add last run-checker fuzzing CIs to Actions
Pauli [Fri, 27 Aug 2021 00:37:35 +0000 (10:37 +1000)]
CI: add last run-checker fuzzing CIs to Actions

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16438)

2 years agoalways use the same perl in $PATH
a1346054 [Thu, 19 Aug 2021 11:05:15 +0000 (11:05 +0000)]
always use the same perl in $PATH

Different tests may use unexpectedly different versions of perl,
depending on whether they hardcode the path to the perl executable or if
they resolve the path from the environment. This fixes it so that the
same perl is always used.

Fix some trailing whitespace and spelling mistakes as well.

CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16362)

2 years agoOpenssl fails to compile on Debian with kfreebsd kernels
Mattias Ellert [Tue, 31 Aug 2021 06:26:06 +0000 (08:26 +0200)]
Openssl fails to compile on Debian with kfreebsd kernels
(kfreebsd-amd64, kfreebsd-i386). The error reported by the compiler
is:

../crypto/uid.c: In function 'OPENSSL_issetugid':
../crypto/uid.c:50:22: error: 'AT_SECURE' undeclared (first use in this function)
   50 |     return getauxval(AT_SECURE) != 0;
      |                      ^~~~~~~~~

This commit changes the code to use the freebsd code in this case.
This fixes the compilation.

CLA: trivial

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16477)

2 years agodev/release.sh: Adjust release branch names to votes
Richard Levitte [Tue, 31 Aug 2021 10:07:33 +0000 (12:07 +0200)]
dev/release.sh: Adjust release branch names to votes

The OTC voted today that the release branch for OpenSSL 3.0 should be
openssl-3.0 rather than openssl-3.0.x.  The release script is changed
accordingly.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16481)

2 years agoAdd a test for verifying an email with a bad othername type
Matt Caswell [Thu, 26 Aug 2021 09:03:51 +0000 (10:03 +0100)]
Add a test for verifying an email with a bad othername type

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16443)

2 years agoEnsure that we check the ASN.1 type of an "otherName" before using it
Matt Caswell [Thu, 26 Aug 2021 08:43:50 +0000 (09:43 +0100)]
Ensure that we check the ASN.1 type of an "otherName" before using it

We should not assume that the type of an ASN.1 value is UTF8String as
expected. We must actually check it, otherwise we could get a NULL ptr
deref, or worse memory errors.

Reported by David Benjamin.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16443)

2 years agoAdd the self test type OSSL_SELF_TEST_TYPE_PCT_SIGNATURE
slontis [Sun, 29 Aug 2021 23:59:54 +0000 (09:59 +1000)]
Add the self test type OSSL_SELF_TEST_TYPE_PCT_SIGNATURE

Fixes #16457

The ECDSA and DSA signature tests use Pairwise tests instead of KATS.
Note there is a seperate type used by the keygen for conditional Pairwise Tests.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16461)

2 years agoAdd a warning about locking in the child provider callback docs
Matt Caswell [Mon, 30 Aug 2021 14:54:22 +0000 (15:54 +0100)]
Add a warning about locking in the child provider callback docs

The child provider callbacks can hold the store lock. In order to avoid
deadlocks we require that the callback implementations don't themselves
call functions that may aquire those locks.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16469)

2 years agoAdd additional test to thread sanitizer build
Pauli [Mon, 16 Aug 2021 02:20:56 +0000 (12:20 +1000)]
Add additional test to thread sanitizer build

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16469)

2 years agoRefactor provider_core.c to adhere to the locking rules
Matt Caswell [Mon, 30 Aug 2021 12:04:31 +0000 (13:04 +0100)]
Refactor provider_core.c to adhere to the locking rules

The previous commit provided some guidelines and some rules for using
locking in order to avoid deadlocks. This commit refactors the code in
order to adhere to those guidelines and rules.

Fixes #16312

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16469)

2 years agoAdd commentary about lock usage in provider_core.c
Matt Caswell [Mon, 30 Aug 2021 14:33:07 +0000 (15:33 +0100)]
Add commentary about lock usage in provider_core.c

Provide some guidelines, as well as some rules for using the locks in
provider_core.c, in order to avoid the introduction of deadlocks.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16469)

2 years agoCI: add builds covering a number of different compiler versions
Pauli [Mon, 30 Aug 2021 06:06:49 +0000 (16:06 +1000)]
CI: add builds covering a number of different compiler versions

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16463)

2 years agoapps/pkcs12: Do not assume null termination of ASN1_UTF8STRING
Tomas Mraz [Tue, 31 Aug 2021 07:05:59 +0000 (09:05 +0200)]
apps/pkcs12: Do not assume null termination of ASN1_UTF8STRING

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/16433)

2 years agoci: Add -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION to asan build
Tomas Mraz [Thu, 26 Aug 2021 13:13:58 +0000 (15:13 +0200)]
ci: Add -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION to asan build

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/16433)

2 years agoMake the -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION pass tests
Tomas Mraz [Thu, 26 Aug 2021 13:08:15 +0000 (15:08 +0200)]
Make the -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION pass tests

Fixes #16428

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/16433)

2 years agoDocument that EVP_get_cipherbyname() does not work for some new algorithm names.
slontis [Wed, 25 Aug 2021 01:50:20 +0000 (11:50 +1000)]
Document that EVP_get_cipherbyname() does not work for some new algorithm names.

These algorithms were added to providers but have no const EVP_CIPHER*
mapping. Ciphers for SIV and CTS were previously only available via low level
function calls that are deprecated.

Reported by @reaperhulk.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16414)

2 years agoTypo correction.
Jaime Hablutzel [Mon, 30 Aug 2021 18:18:48 +0000 (13:18 -0500)]
Typo correction.

CLA: trivial

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16470)

2 years agoUse applink to fix windows tests
Nicola Tuveri [Sat, 21 Aug 2021 01:04:51 +0000 (04:04 +0300)]
Use applink to fix windows tests

(readapted from 5c69c66a6972f84d56160c9ea4b30bab8fc2d3d4 by @bernd-edlinger)

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16355)

2 years ago[ec] Do not default to OPENSSL_EC_NAMED_CURVE for curves without OID
Nicola Tuveri [Thu, 16 Jul 2020 00:23:26 +0000 (03:23 +0300)]
[ec] Do not default to OPENSSL_EC_NAMED_CURVE for curves without OID

Some curves don't have an associated OID: for those we should not
default to `OPENSSL_EC_NAMED_CURVE` encoding of parameters and instead
set the ASN1 flag to `OPENSSL_EC_EXPLICIT_CURVE`.

This is a follow-up to https://github.com/openssl/openssl/pull/12312

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16355)