diff options
| author | Yuval Adam <_@yuv.al> | 2021-03-17 14:41:21 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2021-03-17 14:41:21 +0200 |
| commit | f03f2c98e28136e77792e078e54a6fc768f5d460 (patch) | |
| tree | f78172ff59a4b86e8335763f172ad4ddd56ca923 /verify.py | |
| parent | f24e2789d7b6ad195765674f130d13c68dca6a45 (diff) | |
Exit cleanly on bad ct value
Diffstat (limited to 'verify.py')
| -rw-r--r-- | verify.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -51,7 +51,8 @@ class GreenPassVerifier(object): def validate_data(self): ct = self.data["ct"] if ct not in (1, 2): - raise Exception(f"Unsupported certificate type ct={ct}") + click.secho(f"Unknown certificate type ct={ct}", fg="red", bold=True) + click.get_current_context().exit() def get_cert_path(self, name): return Path(__file__).absolute().parent / "certs" / name |
