[MONGOCRYPT-91] Return an error indicator in _mongocrypt_key_broker_next_kms in wrong state Created: 20/Aug/19  Updated: 15/Oct/19  Resolved: 15/Oct/19

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Trivial - P5
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The general expectation for functions in libmongocrypt is to return a boolean indicating success or failure. Since _mongocrypt_key_broker_next_kms returns a pointer (which may validly be NULL) if it fails due to the wrong key broker state, then the caller is not informed. I'm not sure if there's a reasonable way to inform the caller of mongocrypt_ctx_next_kms_ctx in a better way.

Note, this is not particularly worrisome. If this error is tripped, it's a bug in the binding implementation. And future operations would fail, so it would be clear that something went wrong.


Generated at Thu Feb 08 09:07:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.