pike.git / src / post_modules / Nettle / hogweed.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/hogweed.cmod:412:   #ifdef HAVE_CURVE_NETTLE_SECP_521R1    case SECP521R1: THIS->curve = &nettle_secp_521r1; break;   #endif /* HAVE_CURVE_NETTLE_SECP_521R1 */    default:    Pike_error("Invalid curve\n");    break;    }       ecc_scalar_init(&THIS->scalar_one, THIS->curve);    mpz_init_set_si(mpz_one, 1); + #ifdef PIKE_DEBUG +  if( !ecc_scalar_set(&THIS->scalar_one, mpz_one) ) +  Pike_fatal("Unable to set scalar 1 on ECC curve.\n"); + #else    ecc_scalar_set(&THIS->scalar_one, mpz_one); -  + #endif    mpz_clear(mpz_one);    }       /*! @decl protected local int(0..1) `==(mixed x)    *!    *! @returns    *! Returns @expr{1@} if @[x] is the same @[Curve],    *! and @expr{0@} (zero) otherwise.    */    PIKEFUN int(0..1) `==(mixed x)