ff215713 | 08-Jul-2021 |
Pauli |
apps: add a function opt_legacy_okay() that indicates if legacy paths are permitted or not By default they are. However, if a provider, provider path or a property query has been specified
apps: add a function opt_legacy_okay() that indicates if legacy paths are permitted or not By default they are. However, if a provider, provider path or a property query has been specified they are not. Likewise, if a library context or a property query has been specified by the command, they are not. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16022)
show more ...
|
242dfd8a | 08-Jul-2021 |
Pauli |
apps: add query to allow a command to know of a provider command line option was processed Better fixing: Fixing #15683 Fixing #15686 Replacing rather than fixing: Fixin
apps: add query to allow a command to know of a provider command line option was processed Better fixing: Fixing #15683 Fixing #15686 Replacing rather than fixing: Fixing #15414 Since that claims to fix another: Fixing #15372 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16022)
show more ...
|
ac1e85f4 | 08-Jul-2021 |
Pauli |
test: make build descriptions more consistent Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16022) |
2f8f8e6f | 08-Jul-2021 |
Pauli |
test: add a shim function for the apps's opt_legacy_okay() function Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16022) |
12aa352f | 08-Jul-2021 |
Pauli |
test: rename apps_mem.c to be apps_shims.c in anticipation of additonal functions Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16022) |
5303aa51 | 08-Jul-2021 |
Dr. David von Oheimb |
Fix legacy OCSP_REQ_CTX_http() function to expect ASN.1 formatted input Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://gi
Fix legacy OCSP_REQ_CTX_http() function to expect ASN.1 formatted input Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16029)
show more ...
|
6a1f9cdc | 08-Jul-2021 |
Dr. David von Oheimb |
Improve doc of OSSL_HTTP_REQ_CTX_set_expected() on timeout param < 0 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://githu
Improve doc of OSSL_HTTP_REQ_CTX_set_expected() on timeout param < 0 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16029)
show more ...
|
15729bef | 08-Jul-2021 |
Daiki Ueno |
BIO_lookup_ex: use AI_ADDRCONFIG only if explicit host name is given The flag only affects which record types are queried via DNS (A or AAAA, or both). When node is NULL and AF_UNSPEC i
BIO_lookup_ex: use AI_ADDRCONFIG only if explicit host name is given The flag only affects which record types are queried via DNS (A or AAAA, or both). When node is NULL and AF_UNSPEC is used, it prevents getaddrinfo returning the right address associated with the loopback interface. Signed-off-by: Daiki Ueno <dueno@redhat.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/16033)
show more ...
|
6bfd3e51 | 09-Jul-2021 |
Tomas Mraz |
test_cmp_ctx: Avoid using empty X509 with i2d Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://git
test_cmp_ctx: Avoid using empty X509 with i2d Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/16036)
show more ...
|
50d0a51d | 09-Jul-2021 |
Richard Levitte |
Fix test/asn1_encode_test.c to handle encoding/decoding failure Make it only report (and fail on) encoding/decoding failures when success is expected. Reviewed-by: Tomas Mraz <t
Fix test/asn1_encode_test.c to handle encoding/decoding failure Make it only report (and fail on) encoding/decoding failures when success is expected. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16036)
show more ...
|
f0f4de4e | 09-Jul-2021 |
Richard Levitte |
Fix test/asn1_encode_test.c to not use ASN1_FBOOLEAN ASN1_FBOOLEAN is designed to use as a default for optional ASN1 items. This test program used it for non-optional items, which doesn'
Fix test/asn1_encode_test.c to not use ASN1_FBOOLEAN ASN1_FBOOLEAN is designed to use as a default for optional ASN1 items. This test program used it for non-optional items, which doesn't encode well. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16036)
show more ...
|
4cd47351 | 08-Jul-2021 |
Richard Levitte |
ASN.1: Refuse to encode to DER if non-optional items are missing Fixes #16026 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16
ASN.1: Refuse to encode to DER if non-optional items are missing Fixes #16026 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16036)
show more ...
|
2296cc34 | 08-Jul-2021 |
Richard Levitte |
TEST: Check that i2d refuses to encode non-optional items with no content The test case creates an RSA public key and tries to pass it through i2d_PrivateKey(). This SHOULD fail, since
TEST: Check that i2d refuses to encode non-optional items with no content The test case creates an RSA public key and tries to pass it through i2d_PrivateKey(). This SHOULD fail, since the private bits are missing. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16036)
show more ...
|
f159b83a | 08-Jul-2021 |
Richard Levitte |
Configurations/unix-Makefile.tmpl: use platform->sharedlib() as fallback If platform->sharedlib_simple() and platform->sharedlib_import() return undefined, try platform->sharedlib() as a
Configurations/unix-Makefile.tmpl: use platform->sharedlib() as fallback If platform->sharedlib_simple() and platform->sharedlib_import() return undefined, try platform->sharedlib() as a fallback before platform->staticlib(). Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16023)
show more ...
|
1bbe13fc | 08-Jul-2021 |
Richard Levitte |
platform->sharedlib_simple(): return undef when same as platform->sharedlib() On some Unix-like platforms, there is no such thing as versioned shared libraries. In this case, platform->
platform->sharedlib_simple(): return undef when same as platform->sharedlib() On some Unix-like platforms, there is no such thing as versioned shared libraries. In this case, platform->sharedlib_simple() should simply return undef. Among others, this avoids the shared libraries to be installed as symlinks on themselves. Fixes #16012 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16023)
show more ...
|
0007ff25 | 06-Jul-2021 |
Matt Caswell |
Fix s_server PSK handling Issue #15951 describes a scenario which causes s_server to fail when using a PSK. In the originally described issue this only impacted master and not 1.1.1.
Fix s_server PSK handling Issue #15951 describes a scenario which causes s_server to fail when using a PSK. In the originally described issue this only impacted master and not 1.1.1. However, in fact this issue does also impact 1.1.1 - but only if you additionally supply the option "-no_ticket" to the s_server command line. The difference between the behaviour in master and 1.1.1 is due to 9c13b49, which changed PSK_MAX_IDENTITY_LEN from 128 to 256. It just so happens that a default OpenSSL TLSv1.3 ticket length happens to fall between those 2 values. Tickets are presented in TLSv1.3 as a PSK "identity". Passing "no_ticket" doesn't actually stop TLSv1.3 tickets completely, it just forces the use of "session ids as a ticket" instead. This significantly reduces the ticket size to below 128 in 1.1.1. The problem was due to s_server setting a TLSv1.2 PSK callback and a TLSv1.3 PSK callback. For backwards compat reasons the TLSv1.2 PSK callbacks also work in TLSv1.3 but are not preferred. In the described scenario we use a PSK to create the initial connection. Subsequent to that we attempt a resumption using a TLSv1.3 ticket (psk). If the psk length is below PSK_MAX_IDENTITY_LEN then we first call the TLSv1.2 PSK callback. Subsequently we call the TLSv1.3 PSK callback. Unfortunately s_server's TLSv1.2 PSK callback accepts the identity regardless, even though it is an unexpected value, and hence the binder subsequently fails to verify. The fix is to bail early in the TLSv1.2 callback if we detect we are being called from a TLSv1.3 connection. Fixes #15951 Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16008)
show more ...
|
35258435 | 06-Jul-2021 |
Matt Caswell |
Add a PKCS12 test to check with one input cert we get one output cert Following on from the regression in issue #15983, add a test that with one input cert, we get one cert in the pkcs12
Add a PKCS12 test to check with one input cert we get one output cert Following on from the regression in issue #15983, add a test that with one input cert, we get one cert in the pkcs12 file, and that it has the expected friendlyName. Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16001)
show more ...
|
be618c7c | 05-Jul-2021 |
Matt Caswell |
Don't add the first pkcs12 certificate multiple times This fixes a regression introduced by commit 1d6c867. When exporting a set of certificates to a PKCS12 file we shouldn't add the fir
Don't add the first pkcs12 certificate multiple times This fixes a regression introduced by commit 1d6c867. When exporting a set of certificates to a PKCS12 file we shouldn't add the first one twice. Also we restore historic behaviour with respect to the canames option where we have no ee certificate with key. Fixes #15983 Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16001)
show more ...
|
5c8c2e6b | 05-Jul-2021 |
Pauli |
apps: fix Coverity 1451531 Unchecked return value Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/p
apps: fix Coverity 1451531 Unchecked return value Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/15994)
show more ...
|
e278127c | 07-Jul-2021 |
Pauli |
evp: detect and raise an error if no digest is found for a sign/verify operation If no digest is specified, the code looks for a default digest per PKEY via the evp_keymgmt_util_get_defl
evp: detect and raise an error if no digest is found for a sign/verify operation If no digest is specified, the code looks for a default digest per PKEY via the evp_keymgmt_util_get_deflt_digest_name() call. If this call returns NULL, indicating no digest found, the code continues regardless. If the verify/sign init later fails, it returns an error without raising one. This change raises an error in this case. Fixes #15372 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16015)
show more ...
|
daf4b243 | 05-Jul-2021 |
Juergen Christ |
Fix compile warning with GCC 11. When configured with strict warnings, GCC 11 complains about a possible stringop-translation: Config: /usr/bin/perl ./Configure enable-
Fix compile warning with GCC 11. When configured with strict warnings, GCC 11 complains about a possible stringop-translation: Config: /usr/bin/perl ./Configure enable-asan enable-ubsan enable-zlib-dynamic \ enable-unit-test enable-md2 enable-rc5 enable-buildtest-c++ \ enable-weak-ssl-ciphers enable-ssl3 enable-ssl3-method enable-fips -w \ --strict-warnings Warning: crypto/evp/ctrl_params_translate.c: In function 'fix_rsa_pss_saltlen': crypto/evp/ctrl_params_translate.c:1356:13: error: 'strncpy' specified bound 50 equals destination size [-Werror=stringop-truncation] 1356 | strncpy(ctx->name_buf, str_value_map[i].ptr, sizeof(ctx->name_buf)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix by copying one byte less than the buffer size. We anyway overwrite the last byte. Signed-off-by: Juergen Christ <jchrist@linux.ibm.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15993)
show more ...
|
0588778f | 06-Jul-2021 |
Randall S. Becker |
Made foreign bit field unsigned in evp.h Fixes #16010 Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Revie
Made foreign bit field unsigned in evp.h Fixes #16010 Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16011)
show more ...
|
02db7354 | 06-Jul-2021 |
Rich Salz |
Fix bug in X509_print_ex If the user set nmflags == XN_FLAG_COMPAT and X509_NAME_print_ex(3) failed, the error return value of 0 was misinterpreted as an indicator of success, causin
Fix bug in X509_print_ex If the user set nmflags == XN_FLAG_COMPAT and X509_NAME_print_ex(3) failed, the error return value of 0 was misinterpreted as an indicator of success, causing X509_print_ex(3) to ignore the error, continue printing, and potentially return successfully even though not all the content of the certificate was printed. The X509_NAME_print_ex(3) manual page explains that this function indicates failure by returning 0 if nmflags == XN_FLAG_COMPAT and by returning -1 if nmflags != XN_FLAG_COMPAT. Note that just checking for <= 0 in all cases would not be correct either because X509_NAME_print_ex(3) returns 0 to indicate that it successfully printed zero bytes in some cases, for example when all three of the following conditions hold: 1. nmflags != XN_FLAG_COMPAT 2. indent == 0 (which X509_print_ex(3) does use in some cases) 3. the name object is NULL or empty Thanks to Ingo Schwarze <schwarze@openbsd.org> for finding the bug, and Joel Sing <jsing@openbsd.org> for contributing an idea for the fix. Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16009)
show more ...
|
3bd5319b | 06-Jul-2021 |
Benjamin Kaduk |
Fix comment for test_negotiated_group() test order Because of how the 'client_multi' variable is set, we end up running the tests where the client configures multiple groups (and the
Fix comment for test_negotiated_group() test order Because of how the 'client_multi' variable is set, we end up running the tests where the client configures multiple groups (and the server only configures one) before the ones where the server configures multiple groups (and the client only configures one). Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16007)
show more ...
|
d101700d | 06-Jul-2021 |
Richard Levitte |
CRYPTO: Remove the check for built-in methods in the export_to function That check was seen as necessary at the time, but other changes have been made since, so we now have better contro
CRYPTO: Remove the check for built-in methods in the export_to function That check was seen as necessary at the time, but other changes have been made since, so we now have better control on when we're handling legacy structures and methods, making it safe to run the export_to function on keys with foreign methods. The basic message is that foreign methods must set key structure values according to our standards no matter what, or not set them at all. This has really always been the case, but was harder to see at the time because of interaction with other bugs. Fixes #15927 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15996)
show more ...
|