openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libgcrypt/1.8.4-r0/libgcrypt-1.8.4/mpi/ec.c
gpg_err_code_t _gcry_mpi_ec_p_new(gcry_ctx_t* r_ctx,
                                  enum gcry_mpi_ec_models model,
                                  enum ecc_dialects dialect, int flags,
                                  gcry_mpi_t p, gcry_mpi_t a, gcry_mpi_t b)
{
    gcry_ctx_t ctx;
    mpi_ec_t ec;

    *r_ctx = NULL;
    if (!p || !a)
        return GPG_ERR_EINVAL;

    ctx = _gcry_ctx_alloc(CONTEXT_TYPE_EC, sizeof *ec, ec_deinit);
    if (!ctx)
        return gpg_err_code_from_syserror();
    ec = _gcry_ctx_get_pointer(ctx, CONTEXT_TYPE_EC);
    ec_p_init(ec, model, dialect, flags, p, a, b);

    *r_ctx = ctx;
    return 0;
}
/* This is a variant of _gcry_mpi_ec_p_internal_new which returns an
   public context and does some error checking on the supplied
   arguments.  On success the new context is stored at R_CTX and 0 is
   returned; on error NULL is stored at R_CTX and an error code is
   returned.

   The context needs to be released using gcry_ctx_release.  */
This is a variant of _gcry_mpi_ec_p_internal_new which returns an
public context and does some error checking on the supplied
arguments.  On success the new context is stored at R_CTX and 0 is
returned; on error NULL is stored at R_CTX and an error code is
returned.

The context needs to be released using gcry_ctx_release.
This is a variant of _gcry_mpi_ec_p_internal_new which returns an public context and does some error checking on the supplied arguments . On success the new context is stored at R_CTX and 0 is returned ; on error NULL is stored at R_CTX and an error code is returned . The context needs to be released using gcry_ctx_release .
gpg_err_code_t _gcry_mpi_ec_p_new(gcry_ctx_t* r_ctx,
                                  enum gcry_mpi_ec_models model,
                                  enum ecc_dialects dialect, int flags,
                                  gcry_mpi_t p, gcry_mpi_t a, gcry_mpi_t b)
{
    gcry_ctx_t ctx;
    mpi_ec_t ec;
    *r_ctx = NULL;
    if (!p || !a)
        return GPG_ERR_EINVAL;
    ctx = _gcry_ctx_alloc(CONTEXT_TYPE_EC, sizeof *ec, ec_deinit);
    if (!ctx)
        return gpg_err_code_from_syserror();
    ec = _gcry_ctx_get_pointer(ctx, CONTEXT_TYPE_EC);
    ec_p_init(ec, model, dialect, flags, p, a, b);
    *r_ctx = ctx;
    return 0;
}
gpg_err_code_t _gcry_mpi_ec_p_new ( gcry_ctx_t * r_ctx , enum gcry_mpi_ec_models model , enum ecc_dialects dialect , int flags , gcry_mpi_t p , gcry_mpi_t a , gcry_mpi_t b ) { gcry_ctx_t ctx ; mpi_ec_t ec ; * r_ctx = NULL ; if ( ! p || ! a ) return GPG_ERR_EINVAL ; ctx = _gcry_ctx_alloc ( CONTEXT_TYPE_EC , sizeof * ec , ec_deinit ) ; if ( ! ctx ) return gpg_err_code_from_syserror ( ) ; ec = _gcry_ctx_get_pointer ( ctx , CONTEXT_TYPE_EC ) ; ec_p_init ( ec , model , dialect , flags , p , a , b ) ; * r_ctx = ctx ; return 0 ; }
This is a variant of _gcry_mpi_ec_p_internal_new which returns an
public context and does some error checking on the supplied
arguments.
This is a variant of _gcry_mpi_ec_p_internal_new which returns an public context and does some error checking on the supplied arguments .