Skip to content
Snippets Groups Projects
Commit 9e9100ce authored by tholenst's avatar tholenst Committed by Copybara-Service
Browse files

Stop using the lastest config RegistryConfig from python.

We plan to remove these; so we instead manually register all key managers in python.

PiperOrigin-RevId: 260936807
parent 1054dba0
No related branches found
No related tags found
No related merge requests found
......@@ -14,17 +14,3 @@ cc_library(
"//proto:tink_cc_proto",
],
)
cc_library(
name = "cc_tink_config",
srcs = ["cc_tink_config.cc"],
hdrs = ["cc_tink_config.h"],
include_prefix = "tink/python",
strip_include_prefix = "/python",
deps = [
"//cc",
"//cc/config:tink_config",
"//cc/util:status",
"//proto:config_cc_proto",
],
)
......@@ -18,4 +18,3 @@ from "tink/python/util/clif.h" import * # StatusOr
from "tink/python/cc/cc_tink_config.h":
namespace `crypto::tink`:
def `CcTinkConfigRegister` as register() -> Status
def `CcTinkConfigLatest` as latest() -> RegistryConfig
......@@ -24,19 +24,8 @@ from tink.python.cc.clif import cc_tink_config
class CcTinkConfigTest(absltest.TestCase):
def test_latest(self):
def test_register(self):
cc_tink_config.register()
latest = cc_tink_config.latest()
primitive_names = {entry.primitive_name for entry in latest.entry}
self.assertIn('Aead', primitive_names)
self.assertIn('Mac', primitive_names)
self.assertIn('PublicKeySign', primitive_names)
type_urls = {entry.type_url for entry in latest.entry}
self.assertIn('type.googleapis.com/google.crypto.tink.AesEaxKey', type_urls)
self.assertIn('type.googleapis.com/google.crypto.tink.AesGcmKey', type_urls)
self.assertIn('type.googleapis.com/google.crypto.tink.HmacKey', type_urls)
self.assertIn('type.googleapis.com/google.crypto.tink.EcdsaPrivateKey',
type_urls)
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment