Skip to content
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

Add expected failure assertion in pkcs unpadded signature test #273

Open
wants to merge 1 commit into
base: go1.19-fips-release
Choose a base branch
from

Conversation

derekparker
Copy link
Contributor

OpenSSL has been updated in RHEL9 and is now returning an error while executing this test. The error is expected, so assert we get the expected error back.

OpenSSL has been updated in RHEL9 and is now returning an error while
executing this test. The error is expected, so assert we get the
expected error back.
@derekparker
Copy link
Contributor Author

@ueno while this fixes the test, I'm still not totally confident in it as I don't understand why we're now seeing this error and weren't before. I'd like to understand better what underlying change in OpenSSL seems to be causing this.

@ueno
Copy link
Collaborator

ueno commented Mar 9, 2025

It turned out that this only happens with a special combination of openssl and openssl-fips-provider, where the former is 3.2.2 while the latter is 3.0.7. In that case, optional factors and CRT parameters in an RSA object are stripped off, when importing the object into EVP_PKEY. This doesn't happen when those parameters are set through the non-legacy API, such as EVP_PKEY_fromdata.

Here are test cases:

  • Importing RSA key with EVP_PKEY_set1_RSA, fails on ubi9: test-rsa.c.gz
  • Importing RSA key with EVP_PKEY_fromdata, succeeds on ubi9: test-rsa3.c.gz

@derekparker
Copy link
Contributor Author

@ueno would porting https://github.com/golang-fips/openssl/pull/144/files to 1.19 fix this?

@ueno
Copy link
Collaborator

ueno commented Mar 14, 2025

@ueno would porting https://github.com/golang-fips/openssl/pull/144/files to 1.19 fix this?

I doubt this would help; the issue is in importing an RSA object into EVP_PKEY, and the PR doesn't touch that logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants