diff --git a/nucypher/characters/lawful.py b/nucypher/characters/lawful.py index 13ecd177a..ba0178941 100644 --- a/nucypher/characters/lawful.py +++ b/nucypher/characters/lawful.py @@ -52,7 +52,6 @@ from cryptography.x509 import Certificate, NameOID, load_pem_x509_certificate from eth_typing.evm import ChecksumAddress from eth_utils import to_checksum_address from flask import Response, request -from nucypher.crypto.api import encrypt_and_sign, keccak_digest from twisted.internet import reactor, stdio, threads from twisted.internet.defer import Deferred from twisted.internet.task import LoopingCall diff --git a/nucypher/crypto/keypairs.py b/nucypher/crypto/keypairs.py index 008b0e714..a8a14b7c5 100644 --- a/nucypher/crypto/keypairs.py +++ b/nucypher/crypto/keypairs.py @@ -25,7 +25,6 @@ from constant_sorrow import constants from cryptography.hazmat.primitives.asymmetric import ec from hendrix.deploy.tls import HendrixDeployTLS from hendrix.facilities.services import ExistingKeyTLSContextFactory -from nucypher.crypto.api import _TLS_CURVE from umbral.signing import Signer from nucypher.config.constants import MAX_UPLOAD_CONTENT_LENGTH diff --git a/nucypher/network/server.py b/nucypher/network/server.py index 4df32ae39..d5c17b48f 100644 --- a/nucypher/network/server.py +++ b/nucypher/network/server.py @@ -36,7 +36,6 @@ from nucypher.crypto.keypairs import HostingKeypair, DecryptingKeypair from nucypher.crypto.kits import PolicyMessageKit from nucypher.crypto.powers import KeyPairBasedPower, PowerUpError from nucypher.crypto.signing import InvalidSignature -from nucypher.crypto.tls import InvalidNodeCertificate from nucypher.datastore.datastore import Datastore, RecordNotFound from nucypher.datastore.models import TreasureMap as TreasureMapModel from nucypher.datastore.models import Workorder as WorkOrderModel @@ -401,9 +400,6 @@ def _make_rest_app(datastore: Datastore, this_node, domain: str, log: Logger) -> except NodeSeemsToBeDown: return Response({'error': 'Unreachable node'}, status=400) # ... toasted - except InvalidNodeCertificate: - return Response({'error': 'Invalid TLS certificate - missing checksum address'}, status=400) # ... invalid - # Compare the results of the outer POST with the inner GET... yum if requesting_ursula_bytes == request.data: return Response(status=200) diff --git a/nucypher/policy/maps.py b/nucypher/policy/maps.py index 90235155a..65b06b77b 100644 --- a/nucypher/policy/maps.py +++ b/nucypher/policy/maps.py @@ -31,13 +31,13 @@ from eth_utils.address import to_checksum_address, to_canonical_address from nucypher.blockchain.eth.constants import ETH_ADDRESS_BYTE_LENGTH from nucypher.characters.base import Character -from nucypher.crypto.api import encrypt_and_sign, keccak_digest, verify_eip_191 from nucypher.crypto.constants import HRAC_LENGTH, WRIT_CHECKSUM_SIZE, EIP712_MESSAGE_SIGNATURE_SIZE from nucypher.crypto.kits import UmbralMessageKit from nucypher.crypto.powers import DecryptingPower, SigningPower from nucypher.crypto.signing import SignatureStamp from nucypher.crypto.splitters import signature_splitter from nucypher.crypto.umbral_adapter import KeyFrag, PublicKey, Signature +from nucypher.crypto.utils import keccak_digest, encrypt_and_sign, verify_eip_191 from nucypher.network.middleware import RestMiddleware diff --git a/nucypher/policy/policies.py b/nucypher/policy/policies.py index 165c18b27..a10e18075 100644 --- a/nucypher/policy/policies.py +++ b/nucypher/policy/policies.py @@ -23,12 +23,10 @@ from typing import Tuple, Sequence, Optional, Iterable, List, Dict, Type import maya from bytestring_splitter import BytestringSplitter, VariableLengthBytestring from eth_typing.evm import ChecksumAddress -from nucypher.crypto.api import keccak_digest from twisted.internet import reactor from nucypher.blockchain.eth.agents import StakersReservoir, StakingEscrowAgent from nucypher.blockchain.eth.constants import POLICY_ID_LENGTH -from nucypher.characters.lawful import Alice, Ursula from nucypher.crypto.constants import HRAC_LENGTH from nucypher.crypto.kits import RevocationKit from nucypher.crypto.powers import TransactingPower diff --git a/tests/integration/characters/test_federated_grant_and_revoke.py b/tests/integration/characters/test_federated_grant_and_revoke.py index 893eed794..2ef62fe39 100644 --- a/tests/integration/characters/test_federated_grant_and_revoke.py +++ b/tests/integration/characters/test_federated_grant_and_revoke.py @@ -20,11 +20,9 @@ import datetime import maya import pytest -from nucypher.crypto.api import keccak_digest from nucypher.characters.lawful import Enrico from nucypher.crypto.utils import keccak_digest -from nucypher.policy.collections import Revocation from nucypher.policy.orders import Revocation