New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenSSL 3.0: SSL ECDHE Kex fails when OpenSSL Engine with EC methods is set in config file #20161
Comments
Yeah, the PRE_PARAMS_TO_CTRL case in default_fixup_args() does not seem to be implemented correctly. @levitte might want to look |
A bug in openssl 3, which is used in Ubuntu 22.04, causes an error when attempting to use openssl s_client with an engine. For now, disable the X.509 Ubuntu 22.04 E2E test runs so that the E2E tests can pass. The openssl bug is tracked here: openssl/openssl#20161 Revert this commit once the bug is fixed.
The surprising thing with this is that we do test Line 1917 in c809334
So, what I wonder is what's being done differently in this case |
.... ah! We haven't really tested much using legacy methods, have we? Everything we try has moved to providers, so the param→ctrl translations doesn't get as exercised as they probably should... |
This function didn't prepare space to get the param string, which causes the default_fixup_args() call to fail. Fixes openssl#20161
A bug in openssl 3, which is used in Ubuntu 22.04, causes an error when attempting to use openssl s_client with an engine. For now, disable the X.509 Ubuntu 22.04 E2E test runs so that the E2E tests can pass. The openssl bug is tracked here: openssl/openssl#20161 Revert this commit once the bug is fixed.
The fix for this issue was released in OpenSSL v3.0.9+ (backport commit ff56f28) resp. 3.1.1+ (backport commit d1b2c9b). Unfortunately Ubuntu LTS 22.04 is on OpenSSL 3.0.2 and RedHat EL 9 is on OpenSSL 3.0.7. @ElMostafaIdrassi Did you find any workaround for this issue which could be used on distros without having OpenSSL 3.0.9+? |
I'm having the same issue. The fix is nice, but it's not available for us. hope somebody has a clue how to work around this.. |
Bug description
I've created a sample OpenSSL EC engine : it implements
EC_KEY_METHOD
,EVP_PKEY_ASN1_METHOD
andEVP_PKEY_METHOD
for EC. The engine does not do anything fancy, it just duplicates OpenSSL's defaultEC_KEY_METHOD
,EVP_PKEY_ASN1_METHOD
andEVP_PKEY_METHOD
and then sets them.Once the engine is set in a configuration file and the config exported as
OPENSSL_CONF
, any attempt to perform SSL authentication using OpenSSL 3.0 with ECDHE-RSA-AES256-GCM-SHA384 set as cipher fails with:N.B: ECDHE-RSA-AES256-GCM-SHA384 makes use of the Elliptic Curve P-256.
Environment
Tested commands
The commands were also tested using manually build OpenSSL 3.0.7 and CURL 7.86.0 to confirm this is not a defect linked to the CentOS 9 versions. Additionally, this was also tested using CURL programmatically, and the same issue with the same error message occurs.
Note that the same commands executed in a distribution that uses OpenSSL 1.1.1 work with no issues.
Bug details
It looks like when the server supports only a NIST curve based Key Exchange algorithm (e.g. ECDHE-RSA-AES256-GCM-SHA384), the call to
tls_process_ske_ecdhe
fails. I was able to locate where the failure happens: here is the tree of calls, leading down todefault_fixup_args
returning 0 when it should not, becausectx->p2
is NULL.The text was updated successfully, but these errors were encountered: