diff --git a/Tink/BUILD.bazel b/Tink/BUILD.bazel index d253972..2386113 100644 --- a/Tink/BUILD.bazel +++ b/Tink/BUILD.bazel @@ -1,7 +1,7 @@ load("@build_bazel_rules_apple//apple:ios.bzl", "ios_static_framework", "ios_unit_test") load("//:minimum_os.bzl", "IOS_MINIMUM_OS") -load("//:tink_version.bzl", "TINK_VERSION_LABEL") load("//:template_rule.bzl", "template_rule") +load("//:tink_version.bzl", "TINK_VERSION_LABEL") licenses(["notice"]) @@ -328,6 +328,7 @@ objc_library( ":keyset_handle", "//Tink/util:errors", "@tink_cc//tink:keyset_handle", + "@tink_cc//tink/config:global_registry", "@tink_cc//tink/util:status", ], ) @@ -394,6 +395,7 @@ objc_library( ":keyset_handle", "//Tink/util:errors", "@tink_cc//tink:keyset_handle", + "@tink_cc//tink/config:global_registry", "@tink_cc//tink/util:status", ], ) @@ -443,6 +445,7 @@ objc_library( ":keyset_handle", "//Tink/util:errors", "@tink_cc//tink:keyset_handle", + "@tink_cc//tink/config:global_registry", "@tink_cc//tink/util:status", ], ) @@ -471,6 +474,7 @@ objc_library( ":keyset_handle", "//Tink/util:errors", "@tink_cc//tink:keyset_handle", + "@tink_cc//tink/config:global_registry", "@tink_cc//tink/util:status", ], ) @@ -552,6 +556,7 @@ objc_library( "//Tink:mac_internal", "//Tink/util:errors", "@tink_cc//tink:keyset_handle", + "@tink_cc//tink/config:global_registry", "@tink_cc//tink/util:status", ], ) @@ -667,6 +672,7 @@ objc_library( ":public_key_sign_internal", "//Tink/util:errors", "@tink_cc//tink:keyset_handle", + "@tink_cc//tink/config:global_registry", "@tink_cc//tink/util:status", ], ) @@ -682,6 +688,7 @@ objc_library( ":public_key_verify_internal", "//Tink/util:errors", "@tink_cc//tink:keyset_handle", + "@tink_cc//tink/config:global_registry", "@tink_cc//tink/util:status", ], ) diff --git a/Tink/aead/TINKAeadFactory.mm b/Tink/aead/TINKAeadFactory.mm index c3ca9b1..a9eaa1f 100644 --- a/Tink/aead/TINKAeadFactory.mm +++ b/Tink/aead/TINKAeadFactory.mm @@ -26,6 +26,7 @@ #import "Tink/core/TINKKeysetHandle_Internal.h" #import "Tink/util/TINKErrors.h" +#include "tink/config/global_registry.h" #include "tink/keyset_handle.h" #include "tink/util/status.h" @@ -34,7 +35,7 @@ @implementation TINKAeadFactory + (id)primitiveWithKeysetHandle:(TINKKeysetHandle *)keysetHandle error:(NSError **)error { crypto::tink::KeysetHandle *handle = [keysetHandle ccKeysetHandle]; - auto st = handle->GetPrimitive(); + auto st = handle->GetPrimitive(crypto::tink::ConfigGlobalRegistry()); if (!st.ok()) { if (error) { *error = TINKStatusToError(st.status()); diff --git a/Tink/daead/TINKDeterministicAeadFactory.mm b/Tink/daead/TINKDeterministicAeadFactory.mm index 23c2348..b747065 100644 --- a/Tink/daead/TINKDeterministicAeadFactory.mm +++ b/Tink/daead/TINKDeterministicAeadFactory.mm @@ -26,6 +26,7 @@ #import "Tink/daead/TINKDeterministicAeadInternal.h" #import "Tink/util/TINKErrors.h" +#include "tink/config/global_registry.h" #include "tink/keyset_handle.h" #include "tink/util/status.h" @@ -34,7 +35,8 @@ @implementation TINKDeterministicAeadFactory + (id)primitiveWithKeysetHandle:(TINKKeysetHandle *)keysetHandle error:(NSError **)error { crypto::tink::KeysetHandle *handle = [keysetHandle ccKeysetHandle]; - auto st = handle->GetPrimitive(); + auto st = + handle->GetPrimitive(crypto::tink::ConfigGlobalRegistry()); if (!st.ok()) { if (error) { diff --git a/Tink/hybrid/TINKHybridDecryptFactory.mm b/Tink/hybrid/TINKHybridDecryptFactory.mm index ba36c7e..5c73fa7 100644 --- a/Tink/hybrid/TINKHybridDecryptFactory.mm +++ b/Tink/hybrid/TINKHybridDecryptFactory.mm @@ -26,6 +26,7 @@ #import "Tink/hybrid/TINKHybridDecryptInternal.h" #import "Tink/util/TINKErrors.h" +#include "tink/config/global_registry.h" #include "tink/keyset_handle.h" #include "tink/util/status.h" @@ -35,7 +36,7 @@ @implementation TINKHybridDecryptFactory error:(NSError **)error { crypto::tink::KeysetHandle *handle = [keysetHandle ccKeysetHandle]; - auto st = handle->GetPrimitive(); + auto st = handle->GetPrimitive(crypto::tink::ConfigGlobalRegistry()); if (!st.ok()) { if (error) { *error = TINKStatusToError(st.status()); diff --git a/Tink/hybrid/TINKHybridEncryptFactory.mm b/Tink/hybrid/TINKHybridEncryptFactory.mm index 61a5a59..455c332 100644 --- a/Tink/hybrid/TINKHybridEncryptFactory.mm +++ b/Tink/hybrid/TINKHybridEncryptFactory.mm @@ -26,6 +26,7 @@ #import "Tink/hybrid/TINKHybridEncryptInternal.h" #import "Tink/util/TINKErrors.h" +#include "tink/config/global_registry.h" #include "tink/keyset_handle.h" #include "tink/util/status.h" @@ -35,7 +36,7 @@ @implementation TINKHybridEncryptFactory error:(NSError **)error { crypto::tink::KeysetHandle *handle = [keysetHandle ccKeysetHandle]; - auto st = handle->GetPrimitive(); + auto st = handle->GetPrimitive(crypto::tink::ConfigGlobalRegistry()); if (!st.ok()) { if (error) { *error = TINKStatusToError(st.status()); diff --git a/Tink/mac/TINKMacFactory.mm b/Tink/mac/TINKMacFactory.mm index cc2154a..3641161 100644 --- a/Tink/mac/TINKMacFactory.mm +++ b/Tink/mac/TINKMacFactory.mm @@ -26,6 +26,7 @@ #import "Tink/mac/TINKMacInternal.h" #import "Tink/util/TINKErrors.h" +#include "tink/config/global_registry.h" #include "tink/keyset_handle.h" #include "tink/util/status.h" @@ -34,7 +35,7 @@ @implementation TINKMacFactory + (id)primitiveWithKeysetHandle:(TINKKeysetHandle *)keysetHandle error:(NSError **)error { crypto::tink::KeysetHandle *handle = [keysetHandle ccKeysetHandle]; - auto st = handle->GetPrimitive(); + auto st = handle->GetPrimitive(crypto::tink::ConfigGlobalRegistry()); if (!st.ok()) { if (error) { *error = TINKStatusToError(st.status()); diff --git a/Tink/signature/TINKPublicKeySignFactory.mm b/Tink/signature/TINKPublicKeySignFactory.mm index 485c383..f6ee93b 100644 --- a/Tink/signature/TINKPublicKeySignFactory.mm +++ b/Tink/signature/TINKPublicKeySignFactory.mm @@ -26,6 +26,7 @@ #import "Tink/signature/TINKPublicKeySignInternal.h" #import "Tink/util/TINKErrors.h" +#include "tink/config/global_registry.h" #include "tink/keyset_handle.h" #include "tink/util/status.h" @@ -35,7 +36,7 @@ @implementation TINKPublicKeySignFactory error:(NSError **)error { crypto::tink::KeysetHandle *handle = [keysetHandle ccKeysetHandle]; - auto st = handle->GetPrimitive(); + auto st = handle->GetPrimitive(crypto::tink::ConfigGlobalRegistry()); if (!st.ok()) { if (error) { *error = TINKStatusToError(st.status()); diff --git a/Tink/signature/TINKPublicKeyVerifyFactory.mm b/Tink/signature/TINKPublicKeyVerifyFactory.mm index b48d679..892230e 100644 --- a/Tink/signature/TINKPublicKeyVerifyFactory.mm +++ b/Tink/signature/TINKPublicKeyVerifyFactory.mm @@ -26,6 +26,7 @@ #import "Tink/signature/TINKPublicKeyVerifyInternal.h" #import "Tink/util/TINKErrors.h" +#include "tink/config/global_registry.h" #include "tink/keyset_handle.h" #include "tink/util/status.h" @@ -35,7 +36,8 @@ @implementation TINKPublicKeyVerifyFactory error:(NSError **)error { crypto::tink::KeysetHandle *handle = [keysetHandle ccKeysetHandle]; - auto st = handle->GetPrimitive(); + auto st = + handle->GetPrimitive(crypto::tink::ConfigGlobalRegistry()); if (!st.ok()) { if (error) { *error = TINKStatusToError(st.status());