[MONGOCRYPT-383] Do not declare OpenSSL 1.1 polyfill functions in global scope Created: 16/Feb/22  Updated: 28/Oct/23  Resolved: 17/Feb/22

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3.1

Type: Bug Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-4297 Do not declare OpenSSL 1.1 polyfill f... Closed
Binding Changes: Not Needed

 Description   

Note: this description is intentionally brief, as the full context for this issue is already presented in CDRIVER-4297.

In libmongocrypt, the following OpenSSL 1.1 functions are declared when compiling against OpenSSL 1.0.x:

These functions should either be declared statically or renamed/prefixed, as is done for some libbson compat functions.

Note: EVP_MD_CTX_new and EVP_MD_CTX_free are defined kms-message/src/kms_crypto_libcrypto.c, but those declarations already use static.



 Comments   
Comment by Githook User [ 17/Feb/22 ]

Author:

{'name': 'Remi Collet', 'email': 'remi@remirepo.net', 'username': 'remicollet'}

Message: MONGOCRYPT-383 use static decls for OpenSSL 1.1 polyfills (#251)

  • hide openssl 1.0/1.1 helpers
  • remove EVP_CIPHER_CTX_new and EVP_CIPHER_CTX_free

They are declared in OpenSSL 1.0.1+.
They are declared in LibreSSL 2.0.0+.

Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com>
Branch: master
https://github.com/mongodb/libmongocrypt/commit/7b5e36155264699b62c88413efaf4c7a9638a230

Comment by Jeremy Mikola [ 16/Feb/22 ]

remi submitted a PR: https://github.com/mongodb/libmongocrypt/pull/251

kevin.albertson: Assigning this to you for review.

Generated at Thu Feb 08 09:08:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.