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

mongocrypt_ctx_setopt_key_alt_name should accept a string instead of a bson document

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      This ticket is a request to simplify the mongocrypt_ctx_setopt_key_alt_name api to accept key_alt_name as a char *.

      The current version:

      /**
       * Set the keyAltName to use for explicit encryption.
       * keyAltName should be a binary encoding a bson document
       * with the following format:
       *
       *   { "keyAltName" : <BSON UTF8 value> }
       *
      ...
      mongocrypt_ctx_setopt_key_alt_name (mongocrypt_ctx_t *ctx,
                                          mongocrypt_binary_t *key_alt_name);
      

      My suggested change:

      mongocrypt_ctx_setopt_key_alt_name (mongocrypt_ctx_t *ctx,
                                          const char *key_alt_name,
                                          int len);
      

      This matches how strings are passed in other parts of the api, eg:

      mongocrypt_ctx_setopt_algorithm (mongocrypt_ctx_t *ctx,
                                       const char *algorithm,
                                       int len);
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: