diff --git a/gestion/gen_confs/bind.py b/gestion/gen_confs/bind.py index c8c80da5..e9ca53a4 100755 --- a/gestion/gen_confs/bind.py +++ b/gestion/gen_confs/bind.py @@ -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