diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/primitives/asymmetric/ec.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/ec.py b/src/cryptography/hazmat/primitives/asymmetric/ec.py index 202f1c97..c9124249 100644 --- a/src/cryptography/hazmat/primitives/asymmetric/ec.py +++ b/src/cryptography/hazmat/primitives/asymmetric/ec.py @@ -152,10 +152,7 @@ class EllipticCurvePublicNumbers(object): self._curve = curve def public_key(self, backend): - try: - return backend.load_elliptic_curve_public_numbers(self) - except AttributeError: - return backend.elliptic_curve_public_key_from_numbers(self) + return backend.load_elliptic_curve_public_numbers(self) curve = utils.read_only_property("_curve") x = utils.read_only_property("_x") @@ -191,10 +188,7 @@ class EllipticCurvePrivateNumbers(object): self._public_numbers = public_numbers def private_key(self, backend): - try: - return backend.load_elliptic_curve_private_numbers(self) - except AttributeError: - return backend.elliptic_curve_private_key_from_numbers(self) + return backend.load_elliptic_curve_private_numbers(self) private_value = utils.read_only_property("_private_value") public_numbers = utils.read_only_property("_public_numbers") |