aboutsummaryrefslogtreecommitdiff
path: root/cc/registry.h
AgeCommit message (Collapse)Author
2023-04-18Remove Registry::GetPrimitive(absl::string_view, const MessageLite&);tholenst
This method is untested, and calls the same method in RegistryImpl -- which doesn't exist. Hence, if there would be any user of this method their compilation would already fail, and we can remove the method. PiperOrigin-RevId: 525074582
2023-03-07Remove deprecated versions of RegisterKeyManager for removal.ambrosin
PiperOrigin-RevId: 514689012
2023-03-07Remove Catalogue APIs.ambrosin
PiperOrigin-RevId: 514652127
2023-03-02Mark deprecated versions of RegisterKeyManager for removal.cinlin
PiperOrigin-RevId: 513704158
2022-09-14Mark C++ catalogues for Tink 2 deletion.tholenst
PiperOrigin-RevId: 474238613
2021-03-25Use absl::string_view in Registry argumentswiktorg
PiperOrigin-RevId: 365011843
2021-03-18Add a namespace internal to the registry_impl.tholenst
As it turns out, in C++ it isn't really sufficient to put things into a directory internal, because users who include the normal registry will also get the internal directory included transitively automatically. Hence, in order to make sure that users notice when they include an internal target, we should always mark things with a namespace internal. PiperOrigin-RevId: 363643315
2021-03-17Move registry_impl from core to internal folderrafaelmisoczki
PiperOrigin-RevId: 363400889
2020-02-10Remove obsolete TODO.tholenst
PiperOrigin-RevId: 294175877
2019-11-08Add the guarantee to the Registry that KeyManagers returned by ↵tholenst
get_key_manager() remain valid, even in the presence of concurrent registering calls. This was previously already the case, except for calls to RegisterAsymmetricKeyManagers after a non-asymmetric register call. Hence, there's a bit of a change of behavior, but if someone does this already I think they will prefer the new failure to the previous potential one. I also remove the reference_wrapper TODO, since I think it's infeasible to change this at this point (see e.g. [1]). Let me know if you want to keep it. PiperOrigin-RevId: 279289623
2019-10-25Formatting changes due to internal changes.tholenst
PiperOrigin-RevId: 276745125
2019-08-08Add using declarations for the type parameters in KeyTypeManagers and use them.tholenst
We previously used passed an owned raw pointer from registry.h to registry_impl.h, because this makes it possible to infer template parameters (which doesn't work with unique pointers). However, it is better to instead specify the parameters explicitly, which is easiest if we add typedefs to the KeyTypeManager class. This will also be useful elsewhere (to create [1] automatically). PiperOrigin-RevId: 262295924
2019-07-30Deprecate catalogues.paulavidas
PiperOrigin-RevId: 260722972
2019-07-29Rename InternalKeyManager to KeyTypeManager.tholenst
PiperOrigin-RevId: 260483519
2019-07-10Add a method RegisterAsymmetricKeyManagers to the registry, which allows ↵tholenst
registering a pair of an internal key manager and a corresponding private key manager. PiperOrigin-RevId: 257372013
2019-06-17C++: Allow adding InternalKeyManager objects to the registry.tholenst
PiperOrigin-RevId: 253555275
2019-03-05Updating documentation of Registry (C++, Java)przydatek
PiperOrigin-RevId: 235517508 GitOrigin-RevId: d8c88fc5b3102c699ecab77fc431d854293cc032
2018-10-31Remove the semi-circular dependency between keyset_handle and registry.tholenst
Previously, the keyset_handle and registry would depend on each other, but in a way which could be handled. If we want to introduce the method keyset_handle.GetPrimitive<P>, doing this becomes at the very least very hard and confusing (I would have to split the header into two parts, essentially). Instead, Bartosz pointed out that an option is to make the keyset_handle depend on the registry, and move the method GetPrimitives from the registry to the keyset_handle. I believe that this is the better option. However, it breaks clients who access GetPrimitives in the registry directly. There are no such clients within google; and I hope that there are non in the outside world either. In any case, what needs to be done by any user is to replace all calls Registry::GetPrimitives(keyset_handle, keymanager); with keyset_handle.GetPrimitives(keymanager); PiperOrigin-RevId: 219093515 GitOrigin-RevId: efcd8ce66a94459a073b30f9818008a85904dc52
2018-10-25Add registry functions for PrimitiveWrapper's.tholenst
We create a class PrimitiveWrapper with a method Wrap which essentially replaces the static function [Primitive]SetWrapper::New[Primitive] for each Primitive. We then allow registering this object in the registry and add a method Wrap to the registry. This allows us to replace the function AeadFactory::GetPrimitive with a completely templatized one, which means we will be able to remove the factories. As Thai suggested, I think later we should add a function GetPrimitive<P> to the KeysetHandle. I added a call to register to the AeadFactory; this ensures that it works the same way as before. PiperOrigin-RevId: 218659629 GitOrigin-RevId: 4b99c6356f158c94d7e6d1497f483ea32062940f
2018-10-04Make AddCatalogue work properly with unique pointers.Thomas Holenstein
This is the same fix as for the registry before. PiperOrigin-RevId: 215716532 GitOrigin-RevId: 04fb7d1b20fa73921403d034516a86983ee713d7
2018-10-04Change the templating for the registry keymanager so that the type can be ↵Thomas Holenstein
inferred. Also, add tests of the new, non-deprecated functionality. PiperOrigin-RevId: 215707924 GitOrigin-RevId: 957c628080f38bbc8a36992cf43ace903b2f402b
2018-10-04Change the functions RegisterCatalogue and RegisterKeyManager so they take ↵Thomas Holenstein
unique_ptr instead of raw pointers. PiperOrigin-RevId: 215701167 GitOrigin-RevId: 7bbbbce6db88dbae15614016f229b6e282e4e50d
2018-10-04Project import generated by Copybara.Thomas Holenstein
PiperOrigin-RevId: 215570590 GitOrigin-RevId: 7c887e67cb957d1fd7d608dd0910f3739d648c0b
2018-10-02Remove the recursive mutex from the registry.Thomas Holenstein
This is fairly straightforward -- the only change is that the functions get_new_key_allowed and get_key_factory are internal anyhow, and hence should *not* be guarded by the mutex. Also, there's a pre-existing clang-tidy warning because of all the global variables which are illegal. We should make the registry a class and properly "static-initialize" it. PiperOrigin-RevId: 214780540 GitOrigin-RevId: ae98b3f64affd4ca770fb31fa2c1c4d46086228c
2018-08-30Correcting a wrong comment in C++ Registry.Bartosz Przydatek
PiperOrigin-RevId: 209768143 GitOrigin-RevId: c28dbf80a4df7be228868273081713733653171d
2018-07-27Adding C++ API to get public keys from private keys.Bartosz Przydatek
PiperOrigin-RevId: 206279840 GitOrigin-RevId: d77309c992f7328cb4ef4ad193e82d8d175003a4
2018-07-11Removing the redundant typeUrl-argument from ↵Bartosz Przydatek
Registry.registerKeyManager()-methods. PiperOrigin-RevId: 203816425 GitOrigin-RevId: c9b34b7ee5eeb761d96baa0c8976722f9d2125ba
2018-07-06Registry::RegisterKeyManager - new key allowed can be changed to moreVeronika Slivova
restrictive PiperOrigin-RevId: 203283070 GitOrigin-RevId: 058f0b9a347ec73ba0ae1ee38679c0739a8eec89
2018-07-03Moving C++ to proto lite, and changing from JSONCPP to RapidJSON.Bartosz Przydatek
(based on cl/196889713 and cl/197018177) PiperOrigin-RevId: 202529544 GitOrigin-RevId: f290535f5a57642982d30c43b113cdae6fd7a385
2018-04-17Use Portable Protocol Buffers (go/portableproto) for Tink C++.Haris Andrianakis
Changes: - Renamed all references of something_cc_proto to something_portable_proto. - Added //cc/util/protobuf_helper which creates a namespace portable_port that maps to the correct namespace. - Replaced all deps to //net/proto2/ with //cc/util:protobuf_helper. - Replaced all instances of the proto2:: namespace with portable_proto:: - Deleted the line 'namespace util = crypto::tink::util' because it was conflicting with //util/task/status.h (a dependency of portable_proto_lib). Also, it wasn't really used in any of the files. Notes: - When adding a new proto you will need to whitelist it in proto/portable_tink_filter.asciipb - For google3 (BUILD) we should use portable_proto_lib, for opensource (BUILD.bazel) we should use cc_proto_lib. PiperOrigin-RevId: 193084414 GitOrigin-RevId: 266a0dbb7f66549655e521350b70b10d4a872286
2018-03-18Fixing C++ include-paths.Bartosz Przydatek
PiperOrigin-RevId: 189379168 GitOrigin-RevId: 2524f3b25fbaa08011b512a2730265435f48db37
2017-11-09Adding C++ KeysetManager.Bartosz Przydatek
Change-Id: If71775ddc160f4ba3b3e6c194b589ebd903f7ef4 ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: 434de034db10383329ec23ef7b872b8a0586073e
2017-10-25Replacing StringPiece with const std::string& when it makes sense.Thai Duong
This makes sense if the StringPiece is converted to std::string with StringPiece.ToString() which does copy the string, thus should be avoided. This also makes the migration to absl::string_view easier. Somehow one cannot pass a string_view to methods that take const std::string& (it's possible to do that with StringPiece so I guess it's because string_view does not provide an implicit conversion to const std::string&, but I'm not sure). Change-Id: Ic905a78752c63ac60f25d73ba7898f723e41d9df ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com> GitOrigin-RevId: fbd1fb69494ac4b9b982804c86fcae1f2902aef7
2017-10-25Adding AesCtrHmacAeadKeyManager.Thai Duong
Deleting AesCtrHmacAeadParams proto as it's not used anywhere. Change-Id: I069b6ee749ce3522c4a5935fb7b8628921bc6f0b ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com> GitOrigin-RevId: e958abc862f4f4fce1b6d55ce1bb0dc3e12bf4dc
2017-10-14Adding C++ KeysetReader.Bartosz Przydatek
Change-Id: I33c2a09d2983cd5aee28a1eec886eb22e31bf9f9 ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: e6763b4edc0b874dec4e7056bd124271eeca9f2d
2017-10-06Fixing style and Lint errors.Thai Duong
Change-Id: I0c4af7ce40698561e1d4c98c66628bdc6319990b ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com> GitOrigin-RevId: 02289b9631aca3c5aeec907e45a97d76c825b152
2017-10-06Accepting multiple registration of same key manager in C++ registry.Bartosz Przydatek
Change-Id: I0b1d48d5a29e7d12df805f1cc28aab07d2d9affb ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: 44205bea27caded86c765b480a47fb78b8a72eca
2017-10-06More C++ Config catch-up, adding C++ HOW-TO, fixing typos.Bartosz Przydatek
Change-Id: Ifc49082cfcbcf04335a69e047cf6e7589463a18a ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: aea52716172a1da2cb250f9afe81a71bfc5cd353
2017-10-06Adding C++ configurations support.Bartosz Przydatek
Change-Id: I4b17e65859db914458a32d3359f1a44b5b1b6bde ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: b67033740fe4d4f49410c397aeab503da6365950
2017-09-01Style cleanup after sync.Bartosz Przydatek
Change-Id: Ic497392503b9e6ffb129b039895fc5a2fc5a02ac ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: 19648fdb4d66c4d93db5e85125cacc87ea3b9485
2017-09-01Move util to crypto::tink::util.Thai Duong
Change-Id: I2e628298c31e26da0067196634b5dc4d3bd5ed84 ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com> GitOrigin-RevId: 9b88cb7f7aad68ff16094ab7ff6a3a1620f58cd5
2017-06-22Adding cross-language tests for hybrid encryption.Bartosz Przydatek
Change-Id: I15136873c1b4a00b27169084f354ffbd9a0c9a53 ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: 47c154adf3389b287362fd4a2bde41acf5b53682
2017-05-26Move C++ to google::crypto::tink.Thai Duong
Change-Id: I115b64a1d4a3e4eadb330ed707c9206efd42ae31 ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com> GitOrigin-RevId: 58c9c7744df883bbbe906d3928027607208a7d1a
2017-05-10Fix blaze build and Lint errors.Thai Duong
It seems that blaze (not bazel) doesn't allow implicit conversion from StringPiece to string. Change-Id: I76142bcb2eec0ef2754e6a9a48a3d7ea4356ad49 ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com> GitOrigin-RevId: d98cb3ead7e8342d8dd3820d727025c492959e2a
2017-05-10Changing 'const string&' arguments to StringPieceBartosz Przydatek
Change-Id: I0a56f34273c6d4d1db45f70a77c44521a2b96e42 ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: 4ad25f03e09cde7eb7ab72799483f94a06425e08
2017-05-10Merge "Adding implementation of AeadFactory."Bartosz Przydatek
ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: 64c290e4198e0bf305a446ee71c26b7a4d20c69d
2017-05-03Fix Lint errors.Thai Duong
Change-Id: I246a1d31cb02adc3def4404ff694892e76151c13 ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com> GitOrigin-RevId: 2d6ceb9bd716d1ece5a9a953b27ce98f7089685b
2017-04-12Merge "Adding concurrency protection to Registry."Bartosz Przydatek
ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: 974a6e60e7fe670500d01317d724203aed87e15d
2017-04-11Merge "Minor fixes to enable sync of C++ to google3."Bartosz Przydatek
ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: 8c6f92901ae6be91fdc842be9db3915953fc36a6
2017-03-29Cleanup: separating Registry interface from implementation.Bartosz Przydatek
Change-Id: I9d4d1199c36b859b5870951c85e8f0bb6c035dd0 ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com> GitOrigin-RevId: baaa74af86d9883d826b14bda18ed313868fa092