removing dead TALER_genkey() API call
This commit is contained in:
parent
0b40e78027
commit
09ecea9ea3
@ -110,17 +110,7 @@ struct TALER_Amount
|
|||||||
* Initialize Gcrypt library.
|
* Initialize Gcrypt library.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_gcrypt_init();
|
TALER_gcrypt_init (void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a ECC private key.
|
|
||||||
*
|
|
||||||
* @return the s-expression representing the generated ECC private key; NULL
|
|
||||||
* upon error
|
|
||||||
*/
|
|
||||||
gcry_sexp_t
|
|
||||||
TALER_genkey ();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,43 +58,6 @@ TALER_gcrypt_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a ECC private key.
|
|
||||||
*
|
|
||||||
* @return the s-expression representing the generated ECC private key; NULL
|
|
||||||
* upon error
|
|
||||||
*/
|
|
||||||
gcry_sexp_t
|
|
||||||
TALER_genkey ()
|
|
||||||
{
|
|
||||||
gcry_sexp_t priv_sexp;
|
|
||||||
gcry_sexp_t s_keyparam;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
if (0 != (rc = gcry_sexp_build (&s_keyparam, NULL,
|
|
||||||
"(genkey(ecc(curve \"" CURVE "\")"
|
|
||||||
"(flags eddsa)))")))
|
|
||||||
{
|
|
||||||
LOG_GCRY_ERROR ("gcry_sexp_build", rc);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (0 != (rc = gcry_pk_genkey (&priv_sexp, s_keyparam)))
|
|
||||||
{
|
|
||||||
LOG_GCRY_ERROR ("gcry_pk_genkey", rc);
|
|
||||||
gcry_sexp_release (s_keyparam);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
gcry_sexp_release (s_keyparam);
|
|
||||||
if (0 != (rc = gcry_pk_testkey (priv_sexp)))
|
|
||||||
{
|
|
||||||
LOG_GCRY_ERROR("gcry_pk_testkey", rc);
|
|
||||||
gcry_sexp_release (priv_sexp);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return priv_sexp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse money amount description, in the format "A:B.C".
|
* Parse money amount description, in the format "A:B.C".
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user