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

Use modern openssl functions #264

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cnt0
Copy link

@cnt0 cnt0 commented Dec 31, 2024

Hello. I replaced some functions which are declared as deprecated in OpenSSL 3.0 (cause it's a minimum supported version nowadays) as per its migration guide. This allows to fix some build warnings (I noticed quite a lot of such warnings in telegram codebase BTW).

Also, happy new year!

cnt0 added 2 commits December 31, 2024 14:31
BN_is_prime_ex is deprecated in OpenSSL 3.0, and all OpenSSL versions
lesser than 3.0 are deprecated as well.

Use BN_check_prime according to the migration guide
(https://docs.openssl.org/3.0/man7/migration_guide/).
SHA* functions are deprecated in OpenSSL 3.0 and adviced to replace with
EVP api in migration guide
(https://docs.openssl.org/3.0/man7/migration_guide/).

Also, using generic EVP api allows us to clean up code a bit.
@CLAassistant
Copy link

CLAassistant commented Dec 31, 2024

CLA assistant check
All committers have signed the CLA.

cnt0 added 3 commits January 5, 2025 19:25
EVP_DigestFinal is deprecated according to OpenSSL 3.0 documentation
Otherwise such call makes no sense, and result of EVP_DigestFinal_ex is
undefined.
@cnt0 cnt0 force-pushed the fix-cmake-deprecations branch from 0ed7d19 to f844b9b Compare January 5, 2025 15:18
@ilya-fedin
Copy link
Contributor

@ilya-fedin
Copy link
Contributor

Conclusions from the group discussion:

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.

3 participants