diff --git a/usr/lib/python3.6/vmmgr/crypto.py b/usr/lib/python3.6/vmmgr/crypto.py index 7d409bc..c3a90a9 100644 --- a/usr/lib/python3.6/vmmgr/crypto.py +++ b/usr/lib/python3.6/vmmgr/crypto.py @@ -8,7 +8,6 @@ from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primitives.asymmetric import ec -from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.x509.oid import NameOID, ExtendedKeyUsageOID CERT_PUB_FILE = '/etc/ssl/services.pem' @@ -85,7 +84,7 @@ def get_cert_info(): def verify_signature(file, signature): with open(SIG_PUB_FILE, 'rb') as f: - pub_key = load_pem_public_key(f.read(), default_backend()) + pub_key = serialization.load_pem_public_key(f.read(), default_backend()) pub_key.verify(packages_sig, packages, ec.ECDSA(hashes.SHA512())) def adminpwd_hash(password): diff --git a/usr/lib/python3.6/vmmgr/wsgiapp.py b/usr/lib/python3.6/vmmgr/wsgiapp.py index 3d3d589..079a4d5 100644 --- a/usr/lib/python3.6/vmmgr/wsgiapp.py +++ b/usr/lib/python3.6/vmmgr/wsgiapp.py @@ -3,11 +3,10 @@ import json import os -from werkzeug.exceptions import BadRequest, HTTPException, NotFound +from werkzeug.exceptions import HTTPException, NotFound from werkzeug.routing import Map, Rule from werkzeug.utils import redirect from werkzeug.wrappers import Request, Response -from werkzeug.wsgi import ClosingIterator from jinja2 import Environment, FileSystemLoader from cryptography.exceptions import InvalidSignature