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.
- is related to
-
CDRIVER-2342 _mongoc_scram_start() segfault if scram->user is null
- Closed