Branch: Tag:

2016-09-24

2016-09-24 12:38:20 by Martin Nilsson <nilsson@fastmail.com>

Fix for missing SECP curves.

453:    */    PIKEFUN string(7bit) name()    { + #ifdef HAVE_CURVE_NETTLE_SECP_192R1    if (THIS->curve == &nettle_secp_192r1) {    ref_push_string(MK_STRING("SECP_192R1")); -  } else if (THIS->curve == &nettle_secp_224r1) { +  return; +  } + #endif /* HAVE_CURVE_NETTLE_SECP_192R1 */ + #ifdef HAVE_CURVE_NETTLE_SECP_224R1 +  if (THIS->curve == &nettle_secp_224r1) {    ref_push_string(MK_STRING("SECP_224R1")); -  } else if (THIS->curve == &nettle_secp_256r1) { +  return; +  } + #endif /* HAVE_CURVE_NETTLE_SECP_224R1 */ + #ifdef HAVE_CURVE_NETTLE_SECP_256R1 +  if (THIS->curve == &nettle_secp_256r1) {    ref_push_string(MK_STRING("SECP_256R1")); -  } else if (THIS->curve == &nettle_secp_384r1) { +  return; +  } + #endif /* HAVE_CURVE_NETTLE_SECP_256R1 */ + #ifdef HAVE_CURVE_NETTLE_SECP_384R1 +  if (THIS->curve == &nettle_secp_384r1) {    ref_push_string(MK_STRING("SECP_384R1")); -  } else if (THIS->curve == &nettle_secp_521r1) { +  return; +  } + #endif /* HAVE_CURVE_NETTLE_SECP_384R1 */ + #ifdef HAVE_CURVE_NETTLE_SECP_521R1 +  if (THIS->curve == &nettle_secp_521r1) {    ref_push_string(MK_STRING("SECP_521R1")); -  } else { +  return; +  } + #endif /* HAVE_CURVE_NETTLE_SECP_521R1 */    ref_push_string(MK_STRING("UNKNOWN"));    } -  } +        /*! @decl int size()    *!