Codebase list dnsviz / 7a4b641
Warn if using prohibited or not recommended algorithm Casey Deccio 3 years ago
1 changed file(s) with 5 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
415415
416416 # Independent of whether or not we considered the digest for
417417 # validation, issue a warning if we are using a digest type for which
418 # validation has been prohibited.
418 # validation or publishing has been prohibited.
419419 if self.ds.digest_type in DS_DIGEST_ALGS_VALIDATION_PROHIBITED:
420420 self.warnings.append(Errors.DigestAlgorithmValidationProhibited(algorithm=self.ds.digest_type))
421 elif self.ds.digest_type in DS_DIGEST_ALGS_PROHIBITED:
422 self.warnings.append(Errors.DigestAlgorithmProhibited(algorithm=self.ds.digest_type))
423 elif self.ds.digest_type in DS_DIGEST_ALGS_NOT_RECOMMENDED:
424 self.warnings.append(Errors.DigestAlgorithmNotRecommended(algorithm=self.ds.digest_type))
421425
422426 if self.dnskey is not None and \
423427 self.dnskey.rdata.flags & fmt.DNSKEY_FLAGS['revoke']:
493497 self.warnings.append(Errors.DSDigestAlgorithmIgnored(algorithm=1, new_algorithm=digest_alg))
494498 else:
495499 self.warnings.append(Errors.DSDigestAlgorithmMaybeIgnored(algorithm=1, new_algorithm=digest_alg))
496
497 # For all other digest types, just add a warning here
498 elif self.ds.digest_type in DS_DIGEST_ALGS_PROHIBITED:
499 self.warnings.append(Errors.DigestAlgorithmProhibited(algorithm=self.ds.digest_type))
500 elif self.ds.digest_type in DS_DIGEST_ALGS_NOT_RECOMMENDED:
501 self.warnings.append(Errors.DigestAlgorithmNotRecommended(algorithm=self.ds.digest_type))
502500
503501
504502 def __str__(self):