Skip to content

Fix #2057 and some OpenSSL 3.x compatibility related issues #2206

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

erendemirel
Copy link

@erendemirel erendemirel commented Jul 17, 2025

This PR is to resolve the issue #2057 alongside with some related issues I came across.

Issues Fixed:

  1. Issue opensslconf.h not used #2057 - Missing opensslconf.h Include

  2. OpenSSL 3.x Naming Conflicts- OpenSSL 3.x defines OSSL_FUNC as a type, conflicting with liboqs's macro definition:

Renamed OSSL_FUNC to OQS_OSSL_FUNC across the codebase.

  1. UOV Algorithm OpenSSL Integration- UOV signature algorithms were calling OpenSSL functions directly instead of using liboqs abstraction, causing undefined symbols (EVP_MD_CTX_free, EVP_MD_CTX_new) in CI builds:

Updated all UOV config.h files to change fallback from #define UTILS_OPENSSL to #define UTILS_OQS, ensuring UOV algorithms use liboqs hash abstraction.
Fixed conditional compilation logic in all UOV utils_hash.c files to explicitly prevent OpensSL usage when UTILS_OQS is defined:

  // Changed from:
  #if defined(_UTILS_OPENSSL_)||defined(_UTILS_SUPERCOP_)
  // To:
  #if (defined(_UTILS_OPENSSL_)||defined(_UTILS_SUPERCOP_)) && !defined(_UTILS_OQS_)

Note: Also wrapped any remaining direct OpenSSL calls with OQS_OSSL_FUNC() to ensure complete symbol isolation.

  1. Deprecated OpenSSL Function Calls- UOV algorithms used deprecated OpenSSL functions removed in OpenSSL 3.x
    Updated function calls to resolves CI symbol visibility check failures:
EVP_MD_CTX_create() -> EVP_MD_CTX_new()
EVP_MD_CTX_destroy() -> EVP_MD_CTX_free()

Non-OpenSSL builds compile successfully.
Functional tests pass.
I expect no breaking changes to public API.

Note: This is my first contribution to the repo, so a thorough review might be needed.

No additional tests needed, this PR fixes existing functionality rather than adding new features.

  • Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)
    No
  • Does this PR change the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API? (If so, PRs in fully supported downstream projects dependent on these, i.e., oqs-provider will also need to be ready for review and merge by the time this is merged.)
    No

…- scope SHA/AES functions to their specific component flags
@erendemirel
Copy link
Author

There is a formatting issue, I will have a look later

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.

1 participant