[CDRIVER-2351] Inconsistent #ifdef checks for mongoc-scram.c functions Created: 08/Nov/17  Updated: 31/Mar/22

Status: Backlog
Project: C Driver
Component/s: auth, libmongoc
Affects Version/s: 1.8.1
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-2342 _mongoc_scram_start() segfault if scr... Closed

 Description   

mongoc-scram.c wraps most of its body with an MONGOC_ENABLE_CRYPTO #ifdef, but mongoc-scram-private.h has nothing to prevent declaring its prototypes (if the private header is included directly, as some tests may do).

mongoc-init.c also happens to use a MONGOC_ENABLE_SSL #ifdef to decide if mongoc-scram-private.h should be included and _mongoc_scram_startup() called, which seems a bit inconsistent. It would make more sense to consult MONGOC_ENABLE_CRYPTO.

I noticed both of these while working on CDRIVER-2342.


Generated at Wed Feb 07 21:14:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.