[gen_conf/bind] Pas d'enregistrement TLSA si le certificat est marqué comme révoqué
This commit is contained in:
parent
182597ca35
commit
e4a36fb702
1 changed files with 8 additions and 7 deletions
|
@ -398,13 +398,14 @@ class Zone(ZoneBase):
|
|||
def add_tlsa_record(self, cert):
|
||||
"""Ajout d'un certif dans le DNS"""
|
||||
if 'TLSACert' in cert['objectClass']:
|
||||
for host in cert['hostCert']:
|
||||
nom = self.get_name(host)
|
||||
if nom is None: continue
|
||||
for port in cert['portTCPin']:
|
||||
self.add(TLSA(nom, port, 'tcp', cert['certificat'][0], cert['certificatUsage'][0], cert['matchingType'][0], cert['selector'][0], r_format='der'))
|
||||
for port in cert['portUDPin']:
|
||||
self.add(TLSA(nom, port, 'udp', cert['certificat'][0], cert['certificatUsage'][0], cert['matchingType'][0], cert['selector'][0], r_format='der'))
|
||||
if not cert.get('revocked', [False])[0]:
|
||||
for host in cert['hostCert']:
|
||||
nom = self.get_name(host)
|
||||
if nom is None: continue
|
||||
for port in cert['portTCPin']:
|
||||
self.add(TLSA(nom, port, 'tcp', cert['certificat'][0], cert['certificatUsage'][0], cert['matchingType'][0], cert['selector'][0], r_format='der'))
|
||||
for port in cert['portUDPin']:
|
||||
self.add(TLSA(nom, port, 'udp', cert['certificat'][0], cert['certificatUsage'][0], cert['matchingType'][0], cert['selector'][0], r_format='der'))
|
||||
|
||||
def add_machine(self, machine):
|
||||
"""Ajout d'une machine, à savoir chaînage d'ajout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue