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

version» Context lines:

pike.git/src/post_modules/Nettle/hogweed.cmod:384:       CVAR struct ecc_scalar key;    CVAR struct ecc_point pub;       PIKEVAR function(int:string(0..255)) random    flags ID_PROTECTED;       INIT    {    const struct ecc_curve *curve = -  (((const struct ECC_Curve_struct *)parent_storage(1))->curve); +  (((const struct Nettle_ECC_Curve_struct *)parent_storage(1))->curve);    if (!curve) Pike_error("No curve selected.\n");    ecc_point_init(&THIS->pub, curve);    ecc_scalar_init(&THIS->key, curve);    }       EXIT    {    const struct ecc_curve *curve = -  (((const struct ECC_Curve_struct *)parent_storage(1))->curve); +  (((const struct Nettle_ECC_Curve_struct *)parent_storage(1))->curve);    if (!curve) return;    ecc_point_clear(&THIS->pub);    ecc_scalar_clear(&THIS->key);    }       /*! @decl string(7bit) name()    *!    *! Returns the string @expr{"ECDSA"@} followed by    *! the parenthesized name of the curve.    */    PIKEFUN string(7bit) name()    {    ref_push_string(MK_STRING("ECDSA(")); -  apply_external(1, f_ECC_Curve_name_fun_num, 0); +  apply_external(1, f_Nettle_ECC_Curve_name_fun_num, 0);    ref_push_string(MK_STRING(")"));    f_add(3);    }       /*! @decl ECC_Curve get_curve()    *!    *! Get the elliptic curve that is in use.    */ -  PIKEFUN object(ECC_Curve) get_curve() +  PIKEFUN object(Nettle_ECC_Curve) get_curve()    {    struct external_variable_context loc;    loc.o = Pike_fp->current_object;    loc.inherit = Pike_fp->context;    find_external_context(&loc, 1);    ref_push_object_inherit(loc.o, loc.inherit - loc.o->prog->inherits);    }       /*! @decl Gmp.mpz get_private_key()    *!