Skip to content

Commit b6dd547

Browse files
authored
Expose key id validator (#43)
* Expore key id validator * Relax and use 1.2.3 as next version
1 parent d104c5a commit b6dd547

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dnstapir/key_resolver.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
description="The number of public key lookups",
2525
)
2626

27+
KEY_ID_VALIDATOR = re.compile(r"^[a-zA-Z0-9_\-.]+$")
28+
2729

2830
def key_resolver_from_client_database(client_database: str, key_cache: KeyCache | None = None):
2931
if client_database.startswith("http://") or client_database.startswith("https://"):
@@ -35,7 +37,7 @@ def key_resolver_from_client_database(client_database: str, key_cache: KeyCache
3537
class KeyResolver:
3638
def __init__(self):
3739
self.logger = logging.getLogger(__name__).getChild(self.__class__.__name__)
38-
self.key_id_validator = re.compile(r"^[a-zA-Z0-9_\-.]+$")
40+
self.key_id_validator = KEY_ID_VALIDATOR
3941

4042
@abstractmethod
4143
def resolve_public_key(self, key_id: str) -> PublicKey:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dnstapir"
3-
version = "1.2.2"
3+
version = "1.2.3"
44
description = "DNS TAPIR Python Library"
55
authors = ["Jakob Schlyter <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)