'Get the curves supported by OpenSSL.
:param lib: The OpenSSL library binding object.
:return: A :py:type:`set` of ``cls`` instances giving the names of the
elliptic curves the underlying library supports.'

@classmethod
def _load_elliptic_curves(cls, lib):

    if lib.Cryptography_HAS_EC:
        num_curves = lib.EC_get_builtin_curves(_ffi.NULL, 0)
        builtin_curves = _ffi.new('EC_builtin_curve[]', num_curves)
        lib.EC_get_builtin_curves(builtin_curves, num_curves)
        return set((cls.from_nid(lib, c.nid) for c in builtin_curves))
    return set()
