|
Some functions take a string length:
MONGOCRYPT_EXPORT
|
bool
|
mongocrypt_ctx_setopt_masterkey_aws (mongocrypt_ctx_t *ctx,
|
const char *region,
|
uint32_t region_len,
|
const char *cmk,
|
uint32_t cmk_len);
|
This enables drivers to pass non NULL terminated strings. But others don't:
MONGOCRYPT_EXPORT
|
bool
|
mongocrypt_setopt_kms_provider_aws (mongocrypt_t *crypt,
|
const char *aws_access_key_id,
|
const char *aws_secret_access_key);
|
As per discussion, let's change these methods so that they take a char*-len pair, but allow the length to be -1 to indicate NULL-terminated strings. This gives us a better safety guarantee while allowing more flexibility for drivers.
|