summaryrefslogtreecommitdiff
path: root/tests/keygen.c
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2003-06-09 14:00:20 +0000
committerMoritz Schulte <mo@g10code.com>2003-06-09 14:00:20 +0000
commitcbfb7757c837c3a5df665b1d400b625888bfaa04 (patch)
tree17fb58288eb11cf56485873055ba332d8dfc2ca0 /tests/keygen.c
parent47985c1d7a090455a7769a55c25d015665834071 (diff)
downloadlibgcrypt-cbfb7757c837c3a5df665b1d400b625888bfaa04.tar.gz
2003-06-09 Moritz Schulte <moritz@g10code.com>
* basic.c, keygen.c, pubkey.c, register.c, tsexp.c: Changed to use new API. 2003-06-01 Moritz Schulte <moritz@g10code.com> * tsexp.c (canon_len): Adjust for new gcry_sexp_canon_len API.
Diffstat (limited to 'tests/keygen.c')
-rw-r--r--tests/keygen.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/keygen.c b/tests/keygen.c
index a65a0c39..f8d1a28d 100644
--- a/tests/keygen.c
+++ b/tests/keygen.c
@@ -53,11 +53,11 @@ die ( const char *format, ... )
static void
-print_mpi (const char *text, GcryMPI a)
+print_mpi (const char *text, gcry_mpi_t a)
{
char *buf;
void *bufaddr = &buf;
- int rc;
+ gpg_error_t rc;
rc = gcry_mpi_aprint (GCRYMPI_FMT_HEX, bufaddr, NULL, a);
if (rc)
@@ -71,18 +71,17 @@ print_mpi (const char *text, GcryMPI a)
}
-
static void
-check_generated_rsa_key (GcrySexp key, unsigned long expected_e)
+check_generated_rsa_key (gcry_sexp_t key, unsigned long expected_e)
{
- GcrySexp skey, pkey, list;
+ gcry_sexp_t skey, pkey, list;
pkey = gcry_sexp_find_token (key, "public-key", 0);
if (!pkey)
fail ("public part missing in return value\n");
else
{
- GcryMPI e = NULL;
+ gcry_mpi_t e = NULL;
list = gcry_sexp_find_token (pkey, "e", 0);
if (!list || !(e=gcry_sexp_nth_mpi (list, 1, 0)) )
@@ -118,7 +117,7 @@ check_generated_rsa_key (GcrySexp key, unsigned long expected_e)
static void
check_rsa_keys (void)
{
- GcrySexp keyparm, key;
+ gcry_sexp_t keyparm, key;
int rc;
if (verbose)