openssl.git
3 years agoUpdate the demos/README file because it is really old. New demos should provide best...
Paul Nelson [Wed, 10 Feb 2021 22:49:19 +0000 (16:49 -0600)]
Update the demos/README file because it is really old. New demos should provide best practice for API use.
Add demonstration for computing a SHA3-512 digest - digest/EVP_MD_demo

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

3 years agoCI external tests: separate each external test into its own phase
Tomas Mraz [Thu, 4 Mar 2021 12:37:34 +0000 (13:37 +0100)]
CI external tests: separate each external test into its own phase

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

3 years agoCI external test: for now run only the krb5 and gost_engine tests
Tomas Mraz [Thu, 4 Mar 2021 11:35:16 +0000 (12:35 +0100)]
CI external test: for now run only the krb5 and gost_engine tests

The boringssl (https://github.com/openssl/openssl/issues/14424)
and pyca-cryptography (https://github.com/openssl/openssl/issues/14425)
tests are currently broken.

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

3 years agogost_engine test: further cleanups and fixes
Tomas Mraz [Thu, 4 Mar 2021 11:33:33 +0000 (12:33 +0100)]
gost_engine test: further cleanups and fixes

Allow absolute paths for $SRCTOP and $BLDTOP.

Do not build the gost_engine in tree.

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

3 years agogost_engine test: Run also perl and tcl tests
Tomas Mraz [Wed, 3 Mar 2021 17:46:34 +0000 (18:46 +0100)]
gost_engine test: Run also perl and tcl tests

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

3 years agoCI: add job with external tests
Tomas Mraz [Wed, 3 Mar 2021 17:26:22 +0000 (18:26 +0100)]
CI: add job with external tests

Update gost-engine submodule.
Update pyca-cryptography submodule.

Fix condition for skipping krb5 test.

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

3 years agoDOCS: Document OSSL_STORE_INFO_PUBKEY in doc/man3/OSSL_STORE_INFO.pod
Richard Levitte [Wed, 3 Mar 2021 16:33:08 +0000 (17:33 +0100)]
DOCS: Document OSSL_STORE_INFO_PUBKEY in doc/man3/OSSL_STORE_INFO.pod

Fixes #14414

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

3 years agoMake provider provider_init thread safe, and flag checking/setting too
Richard Levitte [Mon, 1 Mar 2021 12:27:24 +0000 (13:27 +0100)]
Make provider provider_init thread safe, and flag checking/setting too

provider_init() makes changes in the provider structure, and needs a
bit of protection to ensure that doesn't happen concurrently with race
conditions.

This also demands a bit of protection of the flags, since they are
bits and presumably occupy the same byte in memory.

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

3 years agoMake ossl_provider_disable_fallback_loading() thread safe
Richard Levitte [Mon, 1 Mar 2021 12:27:15 +0000 (13:27 +0100)]
Make ossl_provider_disable_fallback_loading() thread safe

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

3 years agotest/threadstest.c: Add a test to load providers concurrently
Richard Levitte [Mon, 1 Mar 2021 15:31:34 +0000 (16:31 +0100)]
test/threadstest.c: Add a test to load providers concurrently

If we don't synchronize properly in the core provider code, and build
with a thread sanitizer, this should cause a crash.

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

3 years agoecx_set_priv_key: Try to obtain libctx from the pkey's keymgmt
Tomas Mraz [Wed, 3 Mar 2021 08:44:25 +0000 (09:44 +0100)]
ecx_set_priv_key: Try to obtain libctx from the pkey's keymgmt

We can try to do that although for legacy keys the keymgmt
will not be set. This function will disappear with legacy support
removed.

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

3 years agobn_ctx.c: Remove TODO 3.0 related to tracing in FIPS module
Tomas Mraz [Tue, 2 Mar 2021 16:17:46 +0000 (17:17 +0100)]
bn_ctx.c: Remove TODO 3.0 related to tracing in FIPS module

We do not want tracing in the FIPS module.

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

3 years agoecx_set_priv_key: Remove TODO 3.0 related to setting libctx
Tomas Mraz [Tue, 2 Mar 2021 16:05:48 +0000 (17:05 +0100)]
ecx_set_priv_key: Remove TODO 3.0 related to setting libctx

This function is used only for legacy keys so the TODO is
not relevant.

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

3 years agodo_sigver_init: Remove fallback for missing provider implementations.
Tomas Mraz [Tue, 2 Mar 2021 15:55:48 +0000 (16:55 +0100)]
do_sigver_init: Remove fallback for missing provider implementations.

We now have everything implemented in providers.

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

3 years agoRemove some of the TODO 3.0 in crypto/evp related to legacy support.
Tomas Mraz [Tue, 2 Mar 2021 15:16:06 +0000 (16:16 +0100)]
Remove some of the TODO 3.0 in crypto/evp related to legacy support.

The legacy support stays in 3.0. The TODOs are dropped.

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

3 years agocrypto/param_build_set.c: Remove irrelevant TODO 3.0
Tomas Mraz [Mon, 1 Mar 2021 16:48:19 +0000 (17:48 +0100)]
crypto/param_build_set.c: Remove irrelevant TODO 3.0

The OSSL_PARAM_set_BN() pads to data_size so there is no
need for OSSL_PARAM_set_BN_pad().

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

3 years agocrypto/ppccap.c: Remove useless TODO 3.0
Tomas Mraz [Mon, 1 Mar 2021 16:24:55 +0000 (17:24 +0100)]
crypto/ppccap.c: Remove useless TODO 3.0

The chacha and poly1305 algorithms are not FIPS approved so
they should stay out of FIPS module.

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

3 years agoinclude/crypto: Remove TODOs that are irrelevant for 3.0
Tomas Mraz [Mon, 1 Mar 2021 15:55:23 +0000 (16:55 +0100)]
include/crypto: Remove TODOs that are irrelevant for 3.0

The legacy support will not be removed in 3.0. Remove the
related TODO 3.0 marks.

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

3 years agoinclude/internal: Remove TODOs that are irrelevant for 3.0
Tomas Mraz [Mon, 1 Mar 2021 15:51:13 +0000 (16:51 +0100)]
include/internal: Remove TODOs that are irrelevant for 3.0

The sha3 and sm3 legacy support requires these headers.

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

3 years agotest/x509: Test for issuer being overwritten when printing.
Tomas Mraz [Tue, 2 Mar 2021 17:55:35 +0000 (18:55 +0100)]
test/x509: Test for issuer being overwritten when printing.

The regression from commit 05458fd was fixed, but there is
no test for that regression. This adds it simply by having
a certificate that we compare for -text output having
a different subject and issuer.

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/14353)

3 years agoOSSL_STORE: restore diagnostics on decrypt error; provide password hints
Dr. David von Oheimb [Thu, 26 Nov 2020 07:35:26 +0000 (08:35 +0100)]
OSSL_STORE: restore diagnostics on decrypt error; provide password hints

Fixes #13493

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

3 years agocrypto: rename error flags in internal structures
Tobias Nießen [Tue, 2 Mar 2021 17:15:32 +0000 (18:15 +0100)]
crypto: rename error flags in internal structures

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/14405)

3 years agoAdd a new test recipe to verify the generated test fipsmodule.cnf
Richard Levitte [Fri, 26 Feb 2021 09:46:27 +0000 (10:46 +0100)]
Add a new test recipe to verify the generated test fipsmodule.cnf

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

3 years agoFix the perl code to get FIPSMODULENAME
Richard Levitte [Thu, 25 Feb 2021 18:40:50 +0000 (19:40 +0100)]
Fix the perl code to get FIPSMODULENAME

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

3 years agoTEST: Remove the build of fipsmodule.cnf from test recipes
Richard Levitte [Tue, 29 Sep 2020 08:26:19 +0000 (10:26 +0200)]
TEST: Remove the build of fipsmodule.cnf from test recipes

The exception is the test recipe that tests 'openssl fipsinstall'.
However, that one uses a different output file name, so it's safe.

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

3 years agoAPPS: Modify 'fipsinstall' to output all notifications on stderr
Richard Levitte [Mon, 28 Sep 2020 19:29:56 +0000 (21:29 +0200)]
APPS: Modify 'fipsinstall' to output all notifications on stderr

The actual output of the 'fipsinstall' is the config file it outputs.
It should be possible to output that to standard output, and diverse
notification messages shouldn't be mixed in.  Therefore, we output
them to standard error instead.

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

3 years agoMake 'tests' depend on a generated 'providers/fipsmodule.cnf'
Richard Levitte [Thu, 25 Feb 2021 16:46:36 +0000 (17:46 +0100)]
Make 'tests' depend on a generated 'providers/fipsmodule.cnf'

providers/fipsmodule.cnf is generated using 'openssl fipsinstall' with
the openssl program in the build directory.

Fixes #14315

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

3 years agobuild.info: Make it possible to use compiled programs as generators
Richard Levitte [Thu, 25 Feb 2021 16:43:57 +0000 (17:43 +0100)]
build.info: Make it possible to use compiled programs as generators

Our goal is to be able to produce fipsmodule.cnf with the help of
'openssl fipsinstall', using the openssl program that we build.

This refactors the generatesrc code in all the build file templates to
replace $generator and $generator_incs with $gen0, $gen_args and $gen_incs,
which makes it easier and more consistent to manipulate different bits
of the generator command, and also keeps the variable names consistent
while not overly long.

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

3 years agobuild.info: Add the possibility to add dependencies on raw targets
Richard Levitte [Thu, 25 Feb 2021 15:55:39 +0000 (16:55 +0100)]
build.info: Add the possibility to add dependencies on raw targets

We need to add something for the 'tests' target to depend on, so a
special syntax for those is introduced:

    DEPEND[|tests|]=fipsmodule.cnf

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

3 years agoDOCS: Fix provider-mac.pod and the docs of our implementations
Richard Levitte [Mon, 1 Mar 2021 17:46:20 +0000 (18:46 +0100)]
DOCS: Fix provider-mac.pod and the docs of our implementations

The idea being that doc/man7/provider-mac.pod is for provider authors,
while provider users find the documentation for each implementation in
doc/man7/EVP_MAC-*.pod, the documentation of parameters wasn't quite
aligned.  This change re-arranges the parameter documentation to be
more aligned with this idea.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14380)

3 years agodoc: add a note to the RAND_get0_ calls indicating how to set the DRBG type.
Pauli [Tue, 2 Mar 2021 08:33:55 +0000 (18:33 +1000)]
doc: add a note to the RAND_get0_ calls indicating how to set the DRBG type.

The type needs to be set before the DRBGs are created.

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

3 years agoossl_rsa_sp800_56b_check_public: Be more lenient with small keys
Tomas Mraz [Tue, 2 Mar 2021 10:33:48 +0000 (11:33 +0100)]
ossl_rsa_sp800_56b_check_public: Be more lenient with small keys

Fixes #13995

For small keys the MR test on the modulus can return
BN_PRIMETEST_COMPOSITE_WITH_FACTOR status although the modulus
is correct.

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

3 years agorand: remove FIPS mode conditional code.
Pauli [Mon, 1 Mar 2021 21:38:00 +0000 (07:38 +1000)]
rand: remove FIPS mode conditional code.

The FIPS provider no longer has seeding sources inside the boundary, the
related conditional code can therefore be removed.

Fixes #14358

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

3 years agoEVP_PKEY_CTX_get/settable_params: pass provider operation context
Tomas Mraz [Fri, 26 Feb 2021 17:02:36 +0000 (18:02 +0100)]
EVP_PKEY_CTX_get/settable_params: pass provider operation context

This allows making the signature operations return different
settable params when the context is initialized with
EVP_DigestSign/VerifyInit.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14338)

3 years agoFix NULL access in ssl_build_cert_chain() when ctx is NULL.
Shane Lontis [Wed, 24 Feb 2021 05:59:14 +0000 (15:59 +1000)]
Fix NULL access in ssl_build_cert_chain() when ctx is NULL.

Fixes #14294

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

3 years agoRemove todos in decode_der2key.c and decode_ms2key.c
Tomas Mraz [Mon, 1 Mar 2021 15:14:30 +0000 (16:14 +0100)]
Remove todos in decode_der2key.c and decode_ms2key.c

Those TODOs do not really apply to 3.0 as the legacy internal
keys will stay.

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

3 years agoImprove error reporting in key exchange provider implementations
Tomas Mraz [Mon, 1 Mar 2021 15:07:15 +0000 (16:07 +0100)]
Improve error reporting in key exchange provider implementations

Added some error reporting in dh_exch.c and unified error reporting
with it in other key exchange methods.

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

3 years agoRemove unused MAX_TLS_MAC_SIZE define
Tomas Mraz [Mon, 1 Mar 2021 14:52:34 +0000 (15:52 +0100)]
Remove unused MAX_TLS_MAC_SIZE define

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

3 years agoRemove todos in providers/implementations/include/prov
Tomas Mraz [Mon, 1 Mar 2021 14:49:50 +0000 (15:49 +0100)]
Remove todos in providers/implementations/include/prov

Those TODOs are not relevant anymore as the headers
are now in providers.

Also make the header guard defines better reflect the
header placement.

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

3 years agoResolve TODOs in signature implementations.
Tomas Mraz [Fri, 26 Feb 2021 17:28:48 +0000 (18:28 +0100)]
Resolve TODOs in signature implementations.

The DER writing errors can be ignored safely.

Document that the EVP_MAX_MD_SIZE is a hardcoded limit
for digest sizes.

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

3 years agostatem_lib.c: Remove TODOs that are unnecessary
Tomas Mraz [Fri, 26 Feb 2021 14:31:23 +0000 (15:31 +0100)]
statem_lib.c: Remove TODOs that are unnecessary

If the EVP_MD_CTX_ctrl is deprecated the code will
generate deprecation warnings. So there is no point in marking
all EVP_MD_CTX_ctrl() calls with TODOs.

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

3 years agotest_ssl_new: X448, X25519, and EdDSA are supported with fips
Tomas Mraz [Fri, 26 Feb 2021 13:42:57 +0000 (14:42 +0100)]
test_ssl_new: X448, X25519, and EdDSA are supported with fips

Removed the related TODOs.

Also adjusted the DH parameters used for the DH test to be acceptable
for FIPS as that now allows only known safe prime parameters.

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

3 years agoevp_extra_test2: Remove TODO 3.0
Tomas Mraz [Fri, 26 Feb 2021 12:10:00 +0000 (13:10 +0100)]
evp_extra_test2: Remove TODO 3.0

The TODO marks optional cleanup that can be done any time in future.

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

3 years agoevp_extra_test: Remove TODO comment as setting the curve is mandatory
Tomas Mraz [Fri, 26 Feb 2021 12:05:39 +0000 (13:05 +0100)]
evp_extra_test: Remove TODO comment as setting the curve is mandatory

Even with the SM2 algorithm the curve is needed for the paramgen.

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

3 years agoFix a copy&paste error in evp_extra_test
Matt Caswell [Mon, 1 Mar 2021 10:48:59 +0000 (10:48 +0000)]
Fix a copy&paste error in evp_extra_test

test_EC_priv_pub fails to test the case where both a private and public
key have been supplied.

Fixes #14349

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

3 years agoFix compiling error on arm
Fangming.Fang [Thu, 25 Feb 2021 08:21:56 +0000 (08:21 +0000)]
Fix compiling error on arm

Fixes #14313

Change-Id: I0dc9dd475a1ed1331738355fbbec0c51fbcb37f1

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

3 years agoopenssl-cmp.pod.in: replace the term 'verify' by the more correct 'validate'
Dr. David von Oheimb [Mon, 1 Mar 2021 09:23:41 +0000 (10:23 +0100)]
openssl-cmp.pod.in: replace the term 'verify' by the more correct 'validate'

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

3 years agoCMP: On NULL-DN subject or issuer input omit field in cert template
Dr. David von Oheimb [Sat, 23 Jan 2021 11:54:39 +0000 (12:54 +0100)]
CMP: On NULL-DN subject or issuer input omit field in cert template

Also improve diagnostics on inconsistent cert request input in apps/cmp.c,
add trace output for transactionIDs on new sessions,
and update the documentation in openssl-cmp.pod.in.

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

3 years agotest: use the new set public and private together call
Pauli [Sat, 27 Feb 2021 02:18:15 +0000 (12:18 +1000)]
test: use the new set public and private together call

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

3 years agotest: add utility function to set the fake random callback on both the public and...
Pauli [Sat, 27 Feb 2021 02:17:57 +0000 (12:17 +1000)]
test: add utility function to set the fake random callback on both the public and private instances

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

3 years agotest: update ECDSA and SM2 internal tests in line with the fake_random change
Pauli [Sat, 27 Feb 2021 01:57:13 +0000 (11:57 +1000)]
test: update ECDSA and SM2 internal tests in line with the fake_random change

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

3 years agotest: update test_random to create real contexts instead of sharing one
Pauli [Sat, 27 Feb 2021 01:55:59 +0000 (11:55 +1000)]
test: update test_random to create real contexts instead of sharing one

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

3 years agomake update
Richard Levitte [Mon, 1 Mar 2021 11:06:36 +0000 (12:06 +0100)]
make update

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

3 years agoFix build of /dev/crypto engine with no-dynamic-engine option
UndefBehavior [Fri, 26 Feb 2021 10:36:08 +0000 (13:36 +0300)]
Fix build of /dev/crypto engine with no-dynamic-engine option

CLA: trivial

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

3 years agoRemove RSA SSLv23 padding mode
Rich Salz [Mon, 22 Feb 2021 17:55:25 +0000 (12:55 -0500)]
Remove RSA SSLv23 padding mode

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14248)

3 years agoGeneralize schmeme parsing of OSSL_HTTP_parse_url() to OSSL_parse_url()
Dr. David von Oheimb [Wed, 17 Feb 2021 16:24:19 +0000 (17:24 +0100)]
Generalize schmeme parsing of OSSL_HTTP_parse_url() to OSSL_parse_url()

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

3 years agoOSSL_HTTP_parse_url(): Handle any userinfo, query, and fragment components
Dr. David von Oheimb [Thu, 28 Jan 2021 21:10:47 +0000 (22:10 +0100)]
OSSL_HTTP_parse_url(): Handle any userinfo, query, and fragment components

Now handle [http[s]://][userinfo@]host[:port][/path][?query][#frag]
by optionally providing any userinfo, query, and frag components.

All usages of this function, which are client-only,
silently ignore userinfo and frag components,
while the query component is taken as part of the path.
Update and extend the unit tests and all affected documentation.
Document and deprecat OCSP_parse_url().

Fixes an issue that came up when discussing FR #14001.

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

3 years agoapps/x509.c: Fix mem leaks in processing of -next_serial in print loop
Dr. David von Oheimb [Fri, 26 Feb 2021 12:26:37 +0000 (13:26 +0100)]
apps/x509.c: Fix mem leaks in processing of -next_serial in print loop

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

3 years agoapps/x509.c: Improve print_name() and coding style of large print loop in x509_main()
Dr. David von Oheimb [Fri, 26 Feb 2021 11:48:43 +0000 (12:48 +0100)]
apps/x509.c: Improve print_name() and coding style of large print loop in x509_main()

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

3 years agoapps/x509.c: Improve indentation of the large print loop in x509_main()
Dr. David von Oheimb [Fri, 26 Feb 2021 10:51:43 +0000 (11:51 +0100)]
apps/x509.c: Improve indentation of the large print loop in x509_main()

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

3 years agoapps/x509.c: Fix too eager call to X509_set_issuer_name() introduced recently
Dr. David von Oheimb [Fri, 26 Feb 2021 10:42:49 +0000 (11:42 +0100)]
apps/x509.c: Fix too eager call to X509_set_issuer_name() introduced recently

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

3 years agorand: use params argument on instantiate call
Pauli [Fri, 26 Feb 2021 00:57:21 +0000 (10:57 +1000)]
rand: use params argument on instantiate call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agocore: add params argument to DRBG instantiate call
Pauli [Fri, 26 Feb 2021 00:57:05 +0000 (10:57 +1000)]
core: add params argument to DRBG instantiate call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agodoc: update documenation with params argument on DRBG instantiate calls
Pauli [Fri, 26 Feb 2021 00:56:46 +0000 (10:56 +1000)]
doc: update documenation with params argument on DRBG instantiate calls

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agotest: update tests to allow for params argument for the instantiate call on EVP_RAND_CTXs
Pauli [Fri, 26 Feb 2021 00:56:17 +0000 (10:56 +1000)]
test: update tests to allow for params argument for the instantiate call on EVP_RAND_CTXs

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: update rand implementations to have a params argument for the instantiate call
Pauli [Fri, 26 Feb 2021 00:55:40 +0000 (10:55 +1000)]
prov: update rand implementations to have a params argument for the instantiate call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agofips: update DRBG KATs for the extra instantiate argument
Pauli [Fri, 26 Feb 2021 00:55:02 +0000 (10:55 +1000)]
fips: update DRBG KATs for the extra instantiate argument

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoevp: add params argument to EVP_RAND_instantiate()
Pauli [Fri, 26 Feb 2021 00:52:13 +0000 (10:52 +1000)]
evp: add params argument to EVP_RAND_instantiate()

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agodoc: document additional argument to KDF derive calls
Pauli [Fri, 26 Feb 2021 00:09:49 +0000 (10:09 +1000)]
doc: document additional argument to KDF derive calls

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: add additional argument to KDF derive call in key exchange
Pauli [Fri, 26 Feb 2021 00:09:27 +0000 (10:09 +1000)]
prov: add additional argument to KDF derive call in key exchange

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agofips: add additional argument to KDF derive call in self test
Pauli [Fri, 26 Feb 2021 00:09:07 +0000 (10:09 +1000)]
fips: add additional argument to KDF derive call in self test

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agocrypto: add additional argument to KDF derive calls
Pauli [Fri, 26 Feb 2021 00:08:45 +0000 (10:08 +1000)]
crypto: add additional argument to KDF derive calls

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoapps: add addition argument to KDF derive call
Pauli [Fri, 26 Feb 2021 00:08:23 +0000 (10:08 +1000)]
apps: add addition argument to KDF derive call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: add extra params argument to KDF implementations
Pauli [Fri, 26 Feb 2021 00:07:23 +0000 (10:07 +1000)]
prov: add extra params argument to KDF implementations

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agotls: adjust for extra argument to KDF derive call
Pauli [Fri, 26 Feb 2021 00:06:52 +0000 (10:06 +1000)]
tls: adjust for extra argument to KDF derive call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agotest: adjust tests to include extra argument to KDF derive call
Pauli [Fri, 26 Feb 2021 00:06:31 +0000 (10:06 +1000)]
test: adjust tests to include extra argument to KDF derive call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoevp: add param argument to KDF derive call
Pauli [Fri, 26 Feb 2021 00:06:11 +0000 (10:06 +1000)]
evp: add param argument to KDF derive call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agocore: add param argument to KDF derive call
Pauli [Fri, 26 Feb 2021 00:05:46 +0000 (10:05 +1000)]
core: add param argument to KDF derive call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agodoc: update provider-mac documentation to account for the additional init() arguments
Pauli [Thu, 25 Feb 2021 04:30:57 +0000 (14:30 +1000)]
doc: update provider-mac documentation to account for the additional init() arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agodoc: update KMAC doc to not say that the `KEY\' parameter needs to be set before...
Pauli [Thu, 25 Feb 2021 04:27:29 +0000 (14:27 +1000)]
doc: update KMAC doc to not say that the `KEY\' parameter needs to be set before the init call

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoapps: update speed to use the additional arguments to MAC_init
Pauli [Thu, 25 Feb 2021 04:12:56 +0000 (14:12 +1000)]
apps: update speed to use the additional arguments to MAC_init

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agodoc: note the additional parameters to EVP_MAC_init()
Pauli [Thu, 25 Feb 2021 04:03:09 +0000 (14:03 +1000)]
doc: note the additional parameters to EVP_MAC_init()

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoupdate poly1305 to have additional init arguments
Pauli [Thu, 25 Feb 2021 03:54:55 +0000 (13:54 +1000)]
update poly1305 to have additional init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoupdate BLAKE2 to have additional init arguments
Pauli [Thu, 25 Feb 2021 03:54:35 +0000 (13:54 +1000)]
update BLAKE2 to have additional init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: update kmac to have additional init arguments
Pauli [Thu, 25 Feb 2021 03:54:13 +0000 (13:54 +1000)]
prov: update kmac to have additional init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: update hmac to have additional init arguments
Pauli [Thu, 25 Feb 2021 03:54:13 +0000 (13:54 +1000)]
prov: update hmac to have additional init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: update gmac to have additional init arguments
Pauli [Thu, 25 Feb 2021 03:54:13 +0000 (13:54 +1000)]
prov: update gmac to have additional init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: update cmac to have additional init arguments
Pauli [Thu, 25 Feb 2021 03:54:12 +0000 (13:54 +1000)]
prov: update cmac to have additional init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: use new MAC_init arguments in HMAC-DRBG
Pauli [Thu, 25 Feb 2021 03:52:25 +0000 (13:52 +1000)]
prov: use new MAC_init arguments in HMAC-DRBG

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: use new MAC_init arguments in signature legacy code
Pauli [Thu, 25 Feb 2021 03:52:06 +0000 (13:52 +1000)]
prov: use new MAC_init arguments in signature legacy code

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoprov: update provider util to be less agressive about changing things unnecessarily
Pauli [Thu, 25 Feb 2021 03:51:28 +0000 (13:51 +1000)]
prov: update provider util to be less agressive about changing things unnecessarily

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agofips: update to use the extra MAC init arguments
Pauli [Thu, 25 Feb 2021 03:51:03 +0000 (13:51 +1000)]
fips: update to use the extra MAC init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agocore: update to use the extra MAC init arguments
Pauli [Thu, 25 Feb 2021 03:50:45 +0000 (13:50 +1000)]
core: update to use the extra MAC init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agotest: updates for the new additional MAC_init arguments
Pauli [Thu, 25 Feb 2021 03:50:01 +0000 (13:50 +1000)]
test: updates for the new additional MAC_init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoevp_test: updates for the new additional MAC_init arguments
Pauli [Thu, 25 Feb 2021 03:49:37 +0000 (13:49 +1000)]
evp_test: updates for the new additional MAC_init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agotls: updates for the new additional MAC_init arguments
Pauli [Thu, 25 Feb 2021 03:49:10 +0000 (13:49 +1000)]
tls: updates for the new additional MAC_init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoevp: updates for the new additional MAC_init arguments
Pauli [Thu, 25 Feb 2021 03:48:48 +0000 (13:48 +1000)]
evp: updates for the new additional MAC_init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agocrmf: updates for the new additional MAC_init arguments
Pauli [Thu, 25 Feb 2021 03:48:27 +0000 (13:48 +1000)]
crmf: updates for the new additional MAC_init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoapps: updates for the new additional MAC_init arguments
Pauli [Thu, 25 Feb 2021 03:48:00 +0000 (13:48 +1000)]
apps: updates for the new additional MAC_init arguments

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

3 years agoapps: update mac to work with additional MAC_init arguments. This doesn't include...
Pauli [Thu, 25 Feb 2021 03:47:36 +0000 (13:47 +1000)]
apps: update mac to work with additional MAC_init arguments.  This doesn't include the creation of new 'key' arguments.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)