mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
notion of can_sign()
This commit is contained in:
@@ -22,6 +22,16 @@ def san(csr):
|
||||
"""Get the subject alternate names from this CSR."""
|
||||
return []
|
||||
|
||||
def can_sign(name):
|
||||
"""Does this CA's policy forbid signing this name via Chocolate DV?"""
|
||||
# We could have a regular expression match here, like
|
||||
# ([a-z0-9]+\.)+[a-z0-9]+
|
||||
# and there is also a list of TLDs to check against to confirm that
|
||||
# the name is actually a FQDN.
|
||||
if "." not in name: return False
|
||||
# Examples of names that are forbidden by policy due to a blacklist.
|
||||
if name in ["google.com", "www.google.com"]: return False
|
||||
|
||||
def verify(key, data):
|
||||
"""What string was validly signed by this public key? (or None)"""
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user