pyca/cryptography — pull request #1173 by Ayrx (2014-06-24 03:59:06+00:00)
Title: Fixed Fedora 20 ECC error

So, even after #1152 got merged I'm still encountering the same problem in #1143.

```
(cryptography)[ayrx@division cryptography]$ python test.py
Traceback (most recent call last):
File "test.py", line 5, in
ec.SECT283K1(), default_backend()
File "/home/ayrx/code/cryptography/cryptography/hazmat/primitives/asymmetric/ec.py", line 198, in generate_private_key
return backend.generate_elliptic_curve_private_key(curve)
File "/home/ayrx/code/cryptography/cryptography/hazmat/backends/multibackend.py", line 267, in generate_elliptic_curve_private_key
return b.generate_elliptic_curve_private_key(curve)
File "/home/ayrx/code/cryptography/cryptography/hazmat/backends/openssl/backend.py", line 990, in generate_elliptic_curve_private_key
assert ctx != self._ffi.NULL
AssertionError
```

I took a stab at fixing the issue, this raises an exception instead of throwing an AssertionError on missing curves now.

```
(cryptography)[ayrx@division cryptography]$ python test.py
Traceback (most recent call last):
File "test.py", line 5, in
ec.SECT283K1(), default_backend()
File "/home/ayrx/code/cryptography/cryptography/hazmat/primitives/asymmetric/ec.py", line 204, in generate_private_key
_Reasons.UNSUPPORTED_ELLIPTIC_CURVE
cryptography.exceptions.UnsupportedAlgorithm: Backend object does not support sect283k1.
```
/cc @public, @reaperhulk