[openssl/openssl] 2b7b7e: test/param_build_test.c: test zero BIGNUM
Richard Levitte
noreply at github.com
Wed Jan 11 22:54:28 UTC 2023
Branch: refs/heads/openssl-3.1
Home: https://github.com/openssl/openssl
Commit: 2b7b7eebf9b7d01f8abab88b9ae0685f33c74b54
https://github.com/openssl/openssl/commit/2b7b7eebf9b7d01f8abab88b9ae0685f33c74b54
Author: Richard Levitte <levitte at openssl.org>
Date: 2023-01-11 (Wed, 11 Jan 2023)
Changed paths:
M test/param_build_test.c
Log Message:
-----------
test/param_build_test.c: test zero BIGNUM
We also add tests where the zero bignum is the only parameter, to test what
that does with the allocated blocks that the OSSL_PARAM_BLD functionality
handles.
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20013)
(cherry picked from commit b49cf273883c8d3f47542941fe5cc6cb51aec9c9)
Commit: fcc224a3c5c868ee4c0f5ab71d2f47e7f620bc98
https://github.com/openssl/openssl/commit/fcc224a3c5c868ee4c0f5ab71d2f47e7f620bc98
Author: Richard Levitte <levitte at openssl.org>
Date: 2023-01-11 (Wed, 11 Jan 2023)
Changed paths:
M crypto/params.c
Log Message:
-----------
In OSSL_PARAM_set_BN(), make sure that the data_size field is at least 1
This way, we guarantee that a zero is represented with one byte of data
that's set to zero.
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20013)
(cherry picked from commit c2ae89148343750e420b72ef1b709ebbc16e47b8)
Commit: e33c37aead7e7dd5647d949db7be875c8fa8c137
https://github.com/openssl/openssl/commit/e33c37aead7e7dd5647d949db7be875c8fa8c137
Author: Richard Levitte <levitte at openssl.org>
Date: 2023-01-11 (Wed, 11 Jan 2023)
Changed paths:
M crypto/param_build.c
Log Message:
-----------
OSSL_PARAM_BLD and BIGNUM; ensure at least one byte is allocated
A zero BIGNUM contains zero bytes, while OSSL_PARAMs with an INTEGER (or
UNSIGNED INTEGER) data type are expected to have at least one data byte
allocated, containing a zero. This wasn't handled correctly.
Fixes #20011
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20013)
(cherry picked from commit c455f87aebf245814ba58d6a398b45ca4e80d1d7)
Compare: https://github.com/openssl/openssl/compare/3d63177fac71...e33c37aead7e
More information about the openssl-commits
mailing list