Check --check-ocsp flags, and test those checks

This commit is contained in:
Peter Eckersley
2016-12-21 14:38:26 -08:00
parent 509f4029bb
commit f495863da9
3 changed files with 10 additions and 1 deletions
+4
View File
@@ -529,6 +529,10 @@ class HelpfulArgumentParser(object):
constants.FORCE_INTERACTIVE_FLAG))
parsed_args.noninteractive_mode = True
parsed_args.check_ocsp = parsed_args.check_ocsp.lower()
if parsed_args.check_ocsp not in ("always", "never", "lazy"):
raise errors.Error('--check-ocsp must be "always", "never", or "lazy"')
if parsed_args.force_interactive and parsed_args.noninteractive_mode:
raise errors.Error(
"Flag for non-interactive mode and {0} conflict".format(