diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-12-24 22:02:00 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-12-24 22:02:00 -0800 |
commit | f05763c7308574b246d4c5b559ea0fe71c873599 (patch) | |
tree | c2569d2316c60ee72da6e19503c11e707e39cfef /src | |
parent | bf4817e9d95d66f5adba8ab5b7224e865e312a45 (diff) | |
parent | c8b63d189197ec5023f2a41dd1c6f7fab6932177 (diff) | |
download | cryptography-f05763c7308574b246d4c5b559ea0fe71c873599.tar.gz cryptography-f05763c7308574b246d4c5b559ea0fe71c873599.tar.bz2 cryptography-f05763c7308574b246d4c5b559ea0fe71c873599.zip |
Merge branch 'master' into openssh-elliptic-curve
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") |