X509Backend support in OpenSSL backend

This PR adds a dependency on `enum34`. I am expecting some improvements to be needed in the docs along with potentially some comments required to explain the purpose of some of the tests.

TODO:
- [x] Resolve issue with EC public keys where curve name is not set. (resolved by raising error for now)

Depends on #1498.
Ok!

On Wed Dec 17 2014 at 1:15:28 PM Paul Kehrer <notifications@github.com>
wrote:

> In src/cryptography/hazmat/backends/openssl/x509.py
> <https://github.com/pyca/cryptography/pull/1499#discussion-diff-22004752>:
>
> > +            pkey.type == self._backend._lib.EVP_PKEY_EC
> > +        ):
> > +            ec_cdata = self._backend._lib.EVP_PKEY_get1_EC_KEY(pkey)
> > +            assert ec_cdata != self._backend._ffi.NULL
> > +            ec_cdata = self._backend._ffi.gc(
> > +                ec_cdata, self._backend._lib.EC_KEY_free
> > +            )
> > +            group = self._backend._lib.EC_KEY_get0_group(ec_cdata)
> > +            assert group != self._backend._ffi.NULL
> > +            nid = self._backend._lib.EC_GROUP_get_curve_name(group)
> > +            if nid == self._backend._lib.NID_undef:
> > +                raise NotImplementedError(
> > +                    "ECDSA certificates with unnamed curves are unsupported "
> > +                    "at this time"
> > +                )
> > +
>
> Might be a good idea. Right now in our OpenSSL EC key classes we call
> _ec_key_curve_sn which asserts that EC_GROUP_get_curve_name isn't undef.
> We could hoist this check into EC key stuff for now. I'd like to put that
> in as a separate PR.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pyca/cryptography/pull/1499/files#r22004752>.
>