Skip to content

Commit

Permalink
Deprecate KmsClient registration in C++.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 572522686
Change-Id: If26070012c9572a5fd5bb4016120ee3f8e1f1cf6
  • Loading branch information
juergw authored and copybara-github committed Oct 11, 2023
1 parent 7e5d86a commit 86899a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tink/kms_clients.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ class KmsClients {
public:
// Adds 'kms_client', which must be non-null, to the list
// of the list of known clients.
ABSL_DEPRECATED(
"KmsClients::Add is deprecated. Use the getAead method on the KmsClient"
"directly, without registering the client.")
static crypto::tink::util::Status Add(std::unique_ptr<KmsClient> kms_client) {
return GlobalInstance().LocalAdd(std::move(kms_client));
}

// Returns the first KmsClient that was added previously via Add(),
// and that does support 'key_uri', which must be non-empty.
// Retains the ownership of the returned KmsClient.
ABSL_DEPRECATED(
"KmsClients::Get is deprecated. Use the getAead method on the KmsClient"
"directly, without registering the client.")
static crypto::tink::util::StatusOr<const KmsClient*>
Get(absl::string_view key_uri) {
return GlobalInstance().LocalGet(key_uri);
Expand Down

0 comments on commit 86899a5

Please sign in to comment.