[gnutls-help] Generating EC key with GnuTLS

Aki Tuomi cmouse at cmouse.fi
Thu May 12 05:29:09 CEST 2016


On Wed, May 11, 2016 at 11:08:01PM +0200, Nikos Mavrogiannopoulos wrote:
> On Wed, 2016-05-11 at 12:52 +0300, Aki Tuomi wrote:
> > I am trying to use GnuTLS library to generate EC key with following
> > code:
> > 
> >   int ec;
> >   gnutls_privkey_t priv;
> >   const char *curve = "secp521r1";
> >   gnutls_pk_algorithm_t pk_algo;
> >   gnutls_ecc_curve_t pk_curve;
> >   int bits;
> >   pk_curve = gnutls_ecc_curve_get_id(curve);
> >   bits = GNUTLS_CURVE_TO_BITS(curve);
> 
> You have a typo on that line. Use pk_curve.
> 
> regards,
> Nikos
> 
> 

Oh doh. Thank you.

Aki

> _______________________________________________
> Gnutls-help mailing list
> Gnutls-help at lists.gnutls.org
> http://lists.gnupg.org/mailman/listinfo/gnutls-help



More information about the Gnutls-help mailing list