Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-122

Clean up internal usage of binary types.

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None

    Description

      We have three ways of representing binary/BSON

      • mongocrypt_binary_t - public
      • _mongocrypt_buffer_t - private, has conveniences
      • bson_t - for working with bson

      Let's be consistent with usage and behavior and document it somewhere. Also regarding const-ness, passing by pointer vs. value, and ownership semantics.

      _mongocrypt_buffer_t should be used everywhere possible, and should statically initialize a bson_t when needed (perhaps it could have a bson_t member).

      Consider having _mongocrypt_buffer_t data-inherit mongocrypt_binary_t, so we can return it directly by casting in public functions.

      Consider where the BSON helpers for traversing/transforming should live (_mongocrypt_transform_binary_in_bson and _mongocrypt_traverse_binary_in_bson).

      Attachments

        Activity

          People

            Unassigned Unassigned
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: