@classmethod
def _get_elliptic_curves(cls, lib):
    """
        Get, cache, and return 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.
        """
    if cls._curves is None:
        cls._curves = cls._load_elliptic_curves(lib)
    return cls._curves
