[MONGOCRYPT-616] Add API to determine if built with native crypto Created: 23/Jan/24  Updated: 25/Jan/24  Resolved: 25/Jan/24

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

Type: New Feature Priority: Unknown
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-2718 Enable use of native crypto in libmon... Implementing

 Description   

Summary

Add API to determine if built with native crypto

Example:

    /**
    * Returns true if libmongocrypt was built with native crypto support.
    *
    * If libmongocrypt was not built with native crypto support, setting crypto
    * hooks is required.
    *
    * @param[in] crypt The @ref mongocrypt_t object.
    *
    * @returns True if libmongocrypt was built with native crypto support.
    */
    MONGOCRYPT_EXPORT
    bool mongocrypt_is_crypto_available(void);
    

Background & Motivation

Motivated by a proposed solution in DRIVERS-2718:

Add a method in CAPI like `bool isCryptoAvailable()`. Change the wrapper to call that method and only register crypto callbacks if it returns false.



 Comments   
Comment by Githook User [ 25/Jan/24 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: MONGOCRYPT-616 add `mongocrypt_is_crypto_available` (#738)
Branch: master
https://github.com/mongodb/libmongocrypt/commit/9bd7e00acc3c87d804f7d1b842acb376f0a01fe4

Comment by Cloud GitHub Webhooks [ 25/Jan/24 ]

kevinAlbs merged a pull request (MONGOCRYPT-616 add `mongocrypt_is_crypto_available`) into the following branch:
master: 9bd7e00acc3c87d804f7d1b842acb376f0a01fe4

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