openssl.git
2 years agoIncrease the default security level to 2
Matt Caswell [Tue, 5 Oct 2021 16:29:35 +0000 (17:29 +0100)]
Increase the default security level to 2

OTC voted to increase the security level from 1 to 2

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/16760)

2 years agodoc: document that property names are unique
Pauli [Thu, 30 Sep 2021 01:39:41 +0000 (11:39 +1000)]
doc: document that property names are unique

Both queries and definitions only support each individual name appearing once.
It is an error to have a name appear more than once.

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

2 years agotest: add failure testing for property parsing
Pauli [Thu, 30 Sep 2021 01:35:32 +0000 (11:35 +1000)]
test: add failure testing for property parsing

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

2 years agoproperty: produce error if a name is duplicated
Pauli [Thu, 30 Sep 2021 01:33:37 +0000 (11:33 +1000)]
property: produce error if a name is duplicated

Neither queries nor definitions handle duplicated property names well.
Make having such an error.

Fixes #16715

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

2 years agoBindhost/bindport should be freed
Dmitry Belyavskiy [Thu, 7 Oct 2021 17:14:50 +0000 (19:14 +0200)]
Bindhost/bindport should be freed

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

2 years agoFix unsafe BIO_get_md_ctx check
PW Hu [Thu, 7 Oct 2021 03:50:59 +0000 (11:50 +0800)]
Fix unsafe BIO_get_md_ctx check

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

2 years agoFix heading in random generator man7 page
Tobias Nießen [Wed, 6 Oct 2021 00:01:42 +0000 (02:01 +0200)]
Fix heading in random generator man7 page

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

2 years agoapps/x509: Fix self-signed check to happen before setting issuer name
Dr. David von Oheimb [Tue, 5 Oct 2021 10:54:15 +0000 (12:54 +0200)]
apps/x509: Fix self-signed check to happen before setting issuer name

Fixes #16720

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

2 years agos_socket.c: Avoid possible NULL pointer dereference
Tomas Mraz [Mon, 4 Oct 2021 09:19:33 +0000 (11:19 +0200)]
s_socket.c: Avoid possible NULL pointer dereference

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/16736)

2 years agoReplace the AES-128-CBC-HMAC-SHA1 cipher in e_ossltest.c
Bernd Edlinger [Sun, 24 May 2020 14:14:02 +0000 (16:14 +0200)]
Replace the AES-128-CBC-HMAC-SHA1 cipher in e_ossltest.c

This replaces the AES-128-CBC-HMAC-SHA1 cipher with a
non-encrypting version for use the test suite.

[extended tests]

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

2 years agoRemove OPENSSL_ia32cap overrides in various test scripts
Bernd Edlinger [Sun, 24 May 2020 09:11:27 +0000 (11:11 +0200)]
Remove OPENSSL_ia32cap overrides in various test scripts

The removed override was: OPENSSL_ia32cap=~0x200000200000000
which disables AESNI codepaths and PCLMULQDQ (useful for ghash).
It is unclear why this was done, but it probably just hides bugs.

[extended tests]

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

2 years agoFix a memory leak in the afalg engine
Bernd Edlinger [Mon, 4 Oct 2021 17:45:19 +0000 (19:45 +0200)]
Fix a memory leak in the afalg engine

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

2 years agoFix for the dasync engine
Dmitry Belyavskiy [Sun, 3 Oct 2021 18:20:23 +0000 (20:20 +0200)]
Fix for the dasync engine

Fixes: #16724
Fixes: #16735
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16734)

2 years agoobj: Add SM4 GCM/CCM OID
Tianjia Zhang [Sun, 3 Oct 2021 03:07:24 +0000 (11:07 +0800)]
obj: Add SM4 GCM/CCM OID

Add the following OID:

  SM4-GCM: 1.2.156.10197.1.104.8
  SM4-CCM: 1.2.156.10197.1.104.9

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16731)

2 years agoRISC-V support for the SHA256
Mark Fedorov [Wed, 29 Sep 2021 17:49:59 +0000 (20:49 +0300)]
RISC-V support for the SHA256

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

2 years agoBIO_f_ssl.pod: Make clear where an SSL BIOs are expected as an argument
Dr. David von Oheimb [Thu, 30 Sep 2021 09:12:49 +0000 (11:12 +0200)]
BIO_f_ssl.pod: Make clear where an SSL BIOs are expected as an argument

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

2 years agoapps/lib/s_socket.c: Fix mem leak on host name in init_client()
Dr. David von Oheimb [Wed, 29 Sep 2021 08:46:23 +0000 (10:46 +0200)]
apps/lib/s_socket.c: Fix mem leak on host name in init_client()

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

2 years agoFix ssl_free() and thus BIO_free() to respect BIO_NOCLOSE
Dr. David von Oheimb [Mon, 27 Sep 2021 12:22:40 +0000 (14:22 +0200)]
Fix ssl_free() and thus BIO_free() to respect BIO_NOCLOSE

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

2 years agoaarch64: support BTI and pointer authentication in assembly
Russ Butler [Sat, 28 Aug 2021 18:57:09 +0000 (13:57 -0500)]
aarch64: support BTI and pointer authentication in assembly

This change adds optional support for
- Armv8.3-A Pointer Authentication (PAuth) and
- Armv8.5-A Branch Target Identification (BTI)
features to the perl scripts.

Both features can be enabled with additional compiler flags.
Unless any of these are enabled explicitly there is no code change at
all.

The extensions are briefly described below. Please read the appropriate
chapters of the Arm Architecture Reference Manual for the complete
specification.

Scope
-----

This change only affects generated assembly code.

Armv8.3-A Pointer Authentication
--------------------------------

Pointer Authentication extension supports the authentication of the
contents of registers before they are used for indirect branching
or load.

PAuth provides a probabilistic method to detect corruption of register
values. PAuth signing instructions generate a Pointer Authentication
Code (PAC) based on the value of a register, a seed and a key.
The generated PAC is inserted into the original value in the register.
A PAuth authentication instruction recomputes the PAC, and if it matches
the PAC in the register, restores its original value. In case of a
mismatch, an architecturally unmapped address is generated instead.

With PAuth, mitigation against ROP (Return-oriented Programming) attacks
can be implemented. This is achieved by signing the contents of the
link-register (LR) before it is pushed to stack. Once LR is popped,
it is authenticated. This way a stack corruption which overwrites the
LR on the stack is detectable.

The PAuth extension adds several new instructions, some of which are not
recognized by older hardware. To support a single codebase for both pre
Armv8.3-A targets and newer ones, only NOP-space instructions are added
by this patch. These instructions are treated as NOPs on hardware
which does not support Armv8.3-A. Furthermore, this patch only considers
cases where LR is saved to the stack and then restored before branching
to its content. There are cases in the code where LR is pushed to stack
but it is not used later. We do not address these cases as they are not
affected by PAuth.

There are two keys available to sign an instruction address: A and B.
PACIASP and PACIBSP only differ in the used keys: A and B, respectively.
The keys are typically managed by the operating system.

To enable generating code for PAuth compile with
-mbranch-protection=<mode>:

- standard or pac-ret: add PACIASP and AUTIASP, also enables BTI
  (read below)
- pac-ret+b-key: add PACIBSP and AUTIBSP

Armv8.5-A Branch Target Identification
--------------------------------------

Branch Target Identification features some new instructions which
protect the execution of instructions on guarded pages which are not
intended branch targets.

If Armv8.5-A is supported by the hardware, execution of an instruction
changes the value of PSTATE.BTYPE field. If an indirect branch
lands on a guarded page the target instruction must be one of the
BTI <jc> flavors, or in case of a direct call or jump it can be any
other instruction. If the target instruction is not compatible with the
value of PSTATE.BTYPE a Branch Target Exception is generated.

In short, indirect jumps are compatible with BTI <j> and <jc> while
indirect calls are compatible with BTI <c> and <jc>. Please refer to the
specification for the details.

Armv8.3-A PACIASP and PACIBSP are implicit branch target
identification instructions which are equivalent with BTI c or BTI jc
depending on system register configuration.

BTI is used to mitigate JOP (Jump-oriented Programming) attacks by
limiting the set of instructions which can be jumped to.

BTI requires active linker support to mark the pages with BTI-enabled
code as guarded. For ELF64 files BTI compatibility is recorded in the
.note.gnu.property section. For a shared object or static binary it is
required that all linked units support BTI. This means that even a
single assembly file without the required note section turns-off BTI
for the whole binary or shared object.

The new BTI instructions are treated as NOPs on hardware which does
not support Armv8.5-A or on pages which are not guarded.

To insert this new and optional instruction compile with
-mbranch-protection=standard (also enables PAuth) or +bti.

When targeting a guarded page from a non-guarded page, weaker
compatibility restrictions apply to maintain compatibility between
legacy and new code. For detailed rules please refer to the Arm ARM.

Compiler support
----------------

Compiler support requires understanding '-mbranch-protection=<mode>'
and emitting the appropriate feature macros (__ARM_FEATURE_BTI_DEFAULT
and __ARM_FEATURE_PAC_DEFAULT). The current state is the following:

-------------------------------------------------------
| Compiler | -mbranch-protection | Feature macros     |
+----------+---------------------+--------------------+
| clang    | 9.0.0               | 11.0.0             |
+----------+---------------------+--------------------+
| gcc      | 9                   | expected in 10.1+  |
-------------------------------------------------------

Available Platforms
------------------

Arm Fast Model and QEMU support both extensions.

https://developer.arm.com/tools-and-software/simulation-models/fast-models
https://www.qemu.org/

Implementation Notes
--------------------

This change adds BTI landing pads even to assembly functions which are
likely to be directly called only. In these cases, landing pads might
be superfluous depending on what code the linker generates.
Code size and performance impact for these cases would be negligible.

Interaction with C code
-----------------------

Pointer Authentication is a per-frame protection while Branch Target
Identification can be turned on and off only for all code pages of a
whole shared object or static binary. Because of these properties if
C/C++ code is compiled without any of the above features but assembly
files support any of them unconditionally there is no incompatibility
between the two.

Useful Links
------------

To fully understand the details of both PAuth and BTI it is advised to
read the related chapters of the Arm Architecture Reference Manual
(Arm ARM):
https://developer.arm.com/documentation/ddi0487/latest/

Additional materials:

"Providing protection for complex software"
https://developer.arm.com/architectures/learn-the-architecture/providing-protection-for-complex-software

Arm Compiler Reference Guide Version 6.14: -mbranch-protection
https://developer.arm.com/documentation/101754/0614/armclang-Reference/armclang-Command-line-Options/-mbranch-protection?lang=en

Arm C Language Extensions (ACLE)
https://developer.arm.com/docs/101028/latest

Addional Notes
--------------

This patch is a copy of the work done by Tamas Petz in boringssl. It
contains the changes from the following commits:

aarch64: support BTI and pointer authentication in assembly
    Change-Id: I4335f92e2ccc8e209c7d68a0a79f1acdf3aeb791
    URL: https://boringssl-review.googlesource.com/c/boringssl/+/42084
aarch64: Improve conditional compilation
    Change-Id: I14902a64e5f403c2b6a117bc9f5fb1a4f4611ebf
    URL: https://boringssl-review.googlesource.com/c/boringssl/+/43524
aarch64: Fix name of gnu property note section
    Change-Id: I6c432d1c852129e9c273f6469a8b60e3983671ec
    URL: https://boringssl-review.googlesource.com/c/boringssl/+/44024

Change-Id: I2d95ebc5e4aeb5610d3b226f9754ee80cf74a9af

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

2 years agodoc: crypto(7) - fix typo
Amit Kulkarni [Thu, 23 Sep 2021 23:59:12 +0000 (16:59 -0700)]
doc: crypto(7) - fix typo

CLA: trivial

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

2 years agoFully initialise cipher/digest app handles
Viktor Dukhovni [Wed, 29 Sep 2021 22:03:13 +0000 (18:03 -0400)]
Fully initialise cipher/digest app handles

This avoids a crash in e.g. `openssl chacha20` as reported by
Steffen Nurpmeso on openssl-users.

Resolves: #16713

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

2 years agodoc/man3/SSL_set_fd.pod: add note about Windows compiler warning
Dr. Matthias St. Pierre [Tue, 28 Sep 2021 14:12:32 +0000 (16:12 +0200)]
doc/man3/SSL_set_fd.pod: add note about Windows compiler warning

According to an old stackoverflow thread [1], citing an even older comment by
Andy Polyakov (1875e6db29, Pull up Win64 support from 0.9.8., 2005-07-05),
a cast of 'SOCKET' (UINT_PTR) to 'int' does not create a problem, because although
the documentation [2] claims that the upper limit is INVALID_SOCKET-1 (2^64 - 2),
in practice the socket() implementation on Windows returns an index into the kernel
handle table, the size of which is limited to 2^24 [3].

Add this note to the manual page to avoid unnecessary roundtrips to StackOverflow.

[1] https://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64
[2] https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2
[3] https://docs.microsoft.com/en-us/windows/win32/sysinfo/kernel-objects

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

2 years agoRISC-V support for the SHA512
marcfedorow [Mon, 20 Sep 2021 16:52:23 +0000 (19:52 +0300)]
RISC-V support for the SHA512

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

2 years agoUpdate manual to reference the IANA TLS Cipher Suites Registry
Erik Lax [Thu, 29 Jul 2021 23:43:36 +0000 (01:43 +0200)]
Update manual to reference the IANA TLS Cipher Suites Registry

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

2 years agoAllow cipher strings to be given using its standard name
Erik Lax [Thu, 29 Jul 2021 22:47:46 +0000 (00:47 +0200)]
Allow cipher strings to be given using its standard name

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

2 years agoBIO_ctrl: Avoid spurious error being raised on NULL bio parameter
Tomas Mraz [Mon, 27 Sep 2021 07:45:31 +0000 (09:45 +0200)]
BIO_ctrl: Avoid spurious error being raised on NULL bio parameter

Some of the functions are being called on NULL bio with the
expectation that such call will not raise an error.

Fixes #16681

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

2 years agoproviders: Add SM4 GCM implementation
Tianjia Zhang [Wed, 1 Sep 2021 08:54:15 +0000 (16:54 +0800)]
providers: Add SM4 GCM implementation

The GCM mode of the SM4 algorithm is specifieded by RFC8998.

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

2 years agoFix return value of BIO_free
Peiwei Hu [Sun, 26 Sep 2021 07:28:19 +0000 (15:28 +0800)]
Fix return value of BIO_free

CLA: trivial

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

2 years agoFix some documentation errors
Peiwei Hu [Sun, 26 Sep 2021 07:44:42 +0000 (15:44 +0800)]
Fix some documentation errors

CLA: trivial

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

2 years agossl: Correct comment for ssl3_read_bytes()
Tianjia Zhang [Sat, 25 Sep 2021 10:06:15 +0000 (18:06 +0800)]
ssl: Correct comment for ssl3_read_bytes()

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

2 years agotest: add some PVK KDF unit test cases
Pauli [Sun, 26 Sep 2021 23:20:20 +0000 (09:20 +1000)]
test: add some PVK KDF unit test cases

These cases were generated using OpenSSL.

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

2 years agochanges: note that PVK KDF has moved to the legacy provider
Pauli [Sun, 26 Sep 2021 23:06:01 +0000 (09:06 +1000)]
changes: note that PVK KDF has moved to the legacy provider

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

2 years agodoc: note that these KDFs require the legacy provider to be available
Pauli [Sun, 26 Sep 2021 23:05:32 +0000 (09:05 +1000)]
doc: note that these KDFs require the legacy provider to be available

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

2 years agodoc: include PVK KDFdocumentation in build.info
Pauli [Thu, 1 Jul 2021 04:48:49 +0000 (14:48 +1000)]
doc: include PVK KDFdocumentation in build.info

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

2 years agoinclude PVK KDF in legacy provider algorithm list
Pauli [Thu, 1 Jul 2021 04:40:44 +0000 (14:40 +1000)]
include PVK KDF in legacy provider algorithm list

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

2 years agodoc: add page for PVK KDF
Pauli [Thu, 1 Jul 2021 04:40:27 +0000 (14:40 +1000)]
doc: add page for PVK KDF

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

2 years agopvk: use PVK KDF
Pauli [Thu, 1 Jul 2021 04:11:17 +0000 (14:11 +1000)]
pvk: use PVK KDF

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

2 years agokdf: Add PVK KDF to providers.
Pauli [Thu, 1 Jul 2021 04:10:04 +0000 (14:10 +1000)]
kdf: Add PVK KDF to providers.

Add PIN Verification Key key derevation function to providers.

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

2 years agoAdd sm2 encryption test case from GM/T 0003.5-2012
Mingjun.Yang [Mon, 6 Sep 2021 07:30:19 +0000 (15:30 +0800)]
Add sm2 encryption test case from GM/T 0003.5-2012

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16511)

2 years agoFix variable name mis-match in example code
Mattias Ellert [Sat, 25 Sep 2021 02:57:57 +0000 (04:57 +0200)]
Fix variable name mis-match in example code

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

2 years agoEVP_PKEY_keygen_init has no argument named pkey
Mattias Ellert [Sat, 25 Sep 2021 02:55:24 +0000 (04:55 +0200)]
EVP_PKEY_keygen_init has no argument named pkey

int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);

So it should not mention it in the man page description.

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

2 years agossl: Correct filename in README
Tianjia Zhang [Fri, 24 Sep 2021 08:55:03 +0000 (16:55 +0800)]
ssl: Correct filename in README

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

2 years agoci: add additional operating system specific builds
Pauli [Fri, 24 Sep 2021 00:28:13 +0000 (10:28 +1000)]
ci: add additional operating system specific builds

These are an attempt to cover off on older OS versions that the main CIs
do not cover.

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

2 years agoAdd changes entry indicating that the OBJ_* calls are now thread safe
Pauli [Sat, 25 Sep 2021 00:41:02 +0000 (10:41 +1000)]
Add changes entry indicating that the OBJ_* calls are now thread safe

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

2 years agotest: add threading test for object creation
Pauli [Mon, 14 Jun 2021 01:11:16 +0000 (11:11 +1000)]
test: add threading test for object creation

In addition, rework the multi tests to use common code.

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

2 years agodoc: add note to indicate that the OBJ_ functions were not thread safe in 3.0
Pauli [Fri, 11 Jun 2021 09:10:49 +0000 (19:10 +1000)]
doc: add note to indicate that the OBJ_ functions were not thread safe in 3.0

Also remove OBJ_thread from the list of non-threadsafe functions.

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

2 years agodoc: Document that the OBJ creation functions are now thread safe.
Pauli [Thu, 24 Jun 2021 13:51:53 +0000 (23:51 +1000)]
doc: Document that the OBJ creation functions are now thread safe.

With the OBJ_ thread locking in place, these documentation changes are not
required.

This reverts commit 0218bcdd3feab456135207c140998305df73ab7b.

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

2 years agoobj: add locking to the OBJ sigid calls
Pauli [Thu, 17 Jun 2021 01:05:02 +0000 (11:05 +1000)]
obj: add locking to the OBJ sigid calls

This is done using a single global lock.  The premise for this is that new
objects will most frequently be added at start up and never added subsequently.
Thus, the locking will be for read most of the time.

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

2 years agoobj: make new NIDs use tsan if possible
Pauli [Thu, 17 Jun 2021 02:41:36 +0000 (12:41 +1000)]
obj: make new NIDs use tsan if possible

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

2 years agoobj: make the OBJ_ calls thread safe
Pauli [Fri, 11 Jun 2021 07:05:20 +0000 (17:05 +1000)]
obj: make the OBJ_ calls thread safe

This is done using a single global lock.  The premise for this is that new
objects will most frequently be added at start up and never added subsequently.
Thus, the locking will be for read most of the time.

This does, however, introduce the overhead of taking an uncontested read lock
when accessing the object database.

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

2 years agotsan: add an addition macro
Pauli [Thu, 17 Jun 2021 02:36:33 +0000 (12:36 +1000)]
tsan: add an addition macro

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

2 years ago80-test_cmp_http.t: Remove -certout option where not needed
Dr. David von Oheimb [Mon, 12 Jul 2021 13:32:02 +0000 (15:32 +0200)]
80-test_cmp_http.t: Remove -certout option where not needed

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

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)