diff options
author | Moritz Schulte <mo@g10code.com> | 2003-04-27 19:18:27 +0000 |
---|---|---|
committer | Moritz Schulte <mo@g10code.com> | 2003-04-27 19:18:27 +0000 |
commit | 55ddea17ae11d69b6fc1a4ff402e5e5b011d28af (patch) | |
tree | b6bf227e7f8b88d0f6d317101490f694566da71c /cipher/rsa.c | |
parent | 5238a4c07992095083091dd1d52fd81502f141b9 (diff) | |
download | libgcrypt-55ddea17ae11d69b6fc1a4ff402e5e5b011d28af.tar.gz |
2003-04-27 Moritz Schulte <moritz@g10code.com>
* pubkey.c (gcry_pubkey_register_default): New macro
`pubkey_use_dummy', use it.
* elgamal.c (elg_names): New variable.
(pubkey_spec_elg): Include elg_names.
* dsa.c (dsa_names): New variable.
(pubkey_spec_dsa): Include dsa_names.
* rsa.c (rsa_names): New variable.
(pubkey_spec_rsa): Include rsa_names.
* pubkey.c (gcry_pubkey_lookup_func_name): Compare name also with
the names listed in `sexp_names'.
2003-04-24 Moritz Schulte <moritz@g10code.com>
* pubkey.c (sexp_to_key): New variables: module, pubkey. Adjusted
to new module interface.
(sexp_to_key): Changend type of argument `retalgo' from `int *' to
`GcryModule **'. Adjusted all callers. Removed argument:
r_algotblidx.
(sexp_to_sig): Changend type of argument `retalgo' from `int *' to
`GcryModule **'. Adjusted all callers.
(sexp_to_enc): Likewise.
(pubkey_get_npkey, pubkey_get_nskey, pubkey_get_nsig,
pubkey_get_nenc): Use strlen to find out the number.
* rsa.c: Adjust pubkey_spec_rsa to new internal interface.
* dsa.c: Likewise.
* elgamal.c: Likewise.
Diffstat (limited to 'cipher/rsa.c')
-rw-r--r-- | cipher/rsa.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cipher/rsa.c b/cipher/rsa.c index 9aea3ddd..526686a6 100644 --- a/cipher/rsa.c +++ b/cipher/rsa.c @@ -616,10 +616,18 @@ _gcry_rsa_get_nbits( int algo, MPI *pkey ) return mpi_get_nbits( pkey[0] ); } +static char *rsa_names[] = + { + "rsa", + "openpgp-rsa", + "oid.1.2.840.113549.1.1.1", + NULL, + }; GcryPubkeySpec pubkey_spec_rsa = { - "RSA", GCRY_PK_RSA, 2, 6, 1, 1, + "RSA", rsa_names, GCRY_PK_RSA, + "ne", "nedpqu", "a", "s", "n", GCRY_PK_USAGE_SIGN | GCRY_PK_USAGE_ENCR, _gcry_rsa_generate, _gcry_rsa_check_secret_key, |