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

Inconsistent #ifdef checks for mongoc-scram.c functions

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • 1.8.1
    • auth, libmongoc

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: