diff options
author | rsiddharth <s@ricketyspace.net> | 2019-07-09 18:05:05 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-07-09 18:05:05 -0400 |
commit | 1d99bd991e7d5222889de6fa2051a897072e7ced (patch) | |
tree | 481c69f64e757db11e5c3499dceb96416c24d71e /revoke_crt.py | |
parent | 38dda5656e0c9a41430571834b6f8c72bef4a0bb (diff) |
revoke_crt.py: Use HTTPError from urllib.error.
Diffstat (limited to 'revoke_crt.py')
-rw-r--r-- | revoke_crt.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/revoke_crt.py b/revoke_crt.py index 6a95cfb..c2a1d63 100644 --- a/revoke_crt.py +++ b/revoke_crt.py @@ -3,6 +3,7 @@ import argparse, subprocess, json, os, urllib.request, sys, base64, binascii, co tempfile, re from urllib.request import urlopen +from urllib.error import HTTPError def revoke_crt(pubkey, crt): """Use the ACME protocol to revoke an ssl certificate signed by a @@ -96,7 +97,7 @@ openssl dgst -sha256 -sign user.key -out {0} {1} try: resp = urlopen("{0}/acme/revoke-cert".format(CA), crt_data.encode()) signed_der = resp.read() - except urllib2.HTTPError as e: + except HTTPError as e: sys.stderr.write("Error: crt_data:\n") sys.stderr.write(crt_data) sys.stderr.write("\n") |