diff options
author | Werner Koch <wk@gnupg.org> | 2010-08-31 17:58:39 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2010-08-31 17:58:39 +0200 |
commit | 87fac9911241310a4b601e126fa2e26b10bd370f (patch) | |
tree | 49e09cc881b44a1dba0e9474040cda1d5f9ce581 /g10/pkglue.c | |
parent | Fix for W32. (diff) | |
download | gnupg2-87fac9911241310a4b601e126fa2e26b10bd370f.tar.xz gnupg2-87fac9911241310a4b601e126fa2e26b10bd370f.zip |
Import OpenPGP keys into the agent.
Diffstat (limited to 'g10/pkglue.c')
-rw-r--r-- | g10/pkglue.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/g10/pkglue.c b/g10/pkglue.c index f3001f549..14a27535f 100644 --- a/g10/pkglue.c +++ b/g10/pkglue.c @@ -244,41 +244,3 @@ pk_decrypt (int algo, gcry_mpi_t * result, gcry_mpi_t * data, return 0; } - -/* Check whether SKEY is a suitable secret key. */ -int -REMOVE_ME_pk_check_secret_key (int algo, gcry_mpi_t *skey) -{ - gcry_sexp_t s_skey; - int rc; - - if (algo == GCRY_PK_DSA) - { - rc = gcry_sexp_build (&s_skey, NULL, - "(private-key(dsa(p%m)(q%m)(g%m)(y%m)(x%m)))", - skey[0], skey[1], skey[2], skey[3], skey[4]); - } - else if (algo == GCRY_PK_ELG || algo == GCRY_PK_ELG_E) - { - rc = gcry_sexp_build (&s_skey, NULL, - "(private-key(elg(p%m)(g%m)(y%m)(x%m)))", - skey[0], skey[1], skey[2], skey[3]); - } - else if (algo == GCRY_PK_RSA - || algo == GCRY_PK_RSA_S || algo == GCRY_PK_RSA_E) - { - rc = gcry_sexp_build (&s_skey, NULL, - "(private-key(rsa(n%m)(e%m)(d%m)(p%m)(q%m)(u%m)))", - skey[0], skey[1], skey[2], skey[3], skey[4], - skey[5]); - } - else - return GPG_ERR_PUBKEY_ALGO; - - if (!rc) - { - rc = gcry_pk_testkey (s_skey); - gcry_sexp_release (s_skey); - } - return rc; -} |