- def __init__(self, protocol: str, port: int, key: str) -> None:
- # TODO: fix key stuff
+ class Usage:
+ CA = 0 # certificate must pass the usual CA check, with the CA specified by the TLSA record
+ EndEntity_PlusCAs = 1 # the certificate must match the TLSA record *and* pass the usual CA check
+ TrustAnchor = 2 # the certificate must pass a check with the TLSA record giving the (only) trust anchor
+ EndEntity = 3 # the certificate must match the TLSA record
+
+ class Selector:
+ Full = 0
+ SubjectPublicKeyInfo = 1
+
+ class MatchingType:
+ Exact = 0
+ SHA256 = 1
+ SHA512 = 2
+
+ def __init__(self, protocol: str, port: int, usage: int, selector: int, matching_type: int, data: str) -> None: