Inconsistent #ifdef checks for mongoc-scram.c functions

XMLWordPrintableJSON

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

      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
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: