'Get the NID for a curve name.'

def _elliptic_curve_to_nid(self, curve):

    curve_aliases = {'secp192r1': 'prime192v1', 'secp256r1': 'prime256v1'}
    curve_name = curve_aliases.get(curve.name, curve.name)
    curve_nid = self._lib.OBJ_sn2nid(curve_name.encode())
    if (curve_nid == self._lib.NID_undef):
        raise UnsupportedAlgorithm('{0}    is    not    a    supported    elliptic    curve'.format(curve.name), _Reasons.UNSUPPORTED_ELLIPTIC_CURVE)
    return curve_nid
