Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2351

Inconsistent #ifdef checks for mongoc-scram.c functions

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.8.1
    • Component/s: auth, libmongoc
    • Labels:

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: