diff options
author | Werner Koch <wk@gnupg.org> | 2014-04-15 16:40:48 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-04-16 14:58:47 +0200 |
commit | 773e23698218755e9172d2507031a8263c47cc0b (patch) | |
tree | e8ebc3d786cae14941a25b1afea93cfc2d878d87 /cipher/pubkey.c | |
parent | ae1fbce6dacf14747af0126e640bd4e54cb8c680 (diff) | |
download | libgcrypt-773e23698218755e9172d2507031a8263c47cc0b.tar.gz |
pubkey: Re-map all depreccated RSA algo numbers.
* cipher/pubkey.c (map_algo): Mape RSA_E and RSA_S.
Diffstat (limited to 'cipher/pubkey.c')
-rw-r--r-- | cipher/pubkey.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cipher/pubkey.c b/cipher/pubkey.c index 9aeacedb..e3842c09 100644 --- a/cipher/pubkey.c +++ b/cipher/pubkey.c @@ -57,18 +57,16 @@ map_algo (int algo) { switch (algo) { - case GCRY_PK_ECDSA: - case GCRY_PK_ECDH: - return GCRY_PK_ECC; - case GCRY_PK_ELG_E: - return GCRY_PK_ELG; - default: - return algo; + case GCRY_PK_RSA_E: return GCRY_PK_RSA; + case GCRY_PK_RSA_S: return GCRY_PK_RSA; + case GCRY_PK_ELG_E: return GCRY_PK_ELG; + case GCRY_PK_ECDSA: return GCRY_PK_ECC; + case GCRY_PK_ECDH: return GCRY_PK_ECC; + default: return algo; } } - /* Return the spec structure for the public key algorithm ALGO. For an unknown algorithm NULL is returned. */ static gcry_pk_spec_t * |