SHA256
1
0
forked from pool/gpg2
gpg2/gnupg-2.0.9-RSA_ES.patch

46 lines
1.4 KiB
Diff

# adds back support for deprecated RSA_E, RSA_S algorithms
---
# g10/misc.c | 8 ++++++++
# 1 file changed, 8 insertions(+)
#
Index: gnupg-2.0.20/g10/misc.c
===================================================================
--- gnupg-2.0.20.orig/g10/misc.c 2013-05-10 13:55:47.000000000 +0100
+++ gnupg-2.0.20/g10/misc.c 2013-05-10 19:57:18.000000000 +0100
@@ -1326,6 +1326,8 @@ pubkey_get_npkey( int algo )
if (algo == GCRY_PK_ELG_E)
algo = GCRY_PK_ELG;
+ if (algo == GCRY_PK_RSA_E || algo == GCRY_PK_RSA_S)
+ algo = GCRY_PK_RSA;
if (gcry_pk_algo_info( algo, GCRYCTL_GET_ALGO_NPKEY, NULL, &n))
n = 0;
return n;
@@ -1339,6 +1341,8 @@ pubkey_get_nskey( int algo )
if (algo == GCRY_PK_ELG_E)
algo = GCRY_PK_ELG;
+ if (algo == GCRY_PK_RSA_E || algo == GCRY_PK_RSA_S)
+ algo = GCRY_PK_RSA;
if (gcry_pk_algo_info( algo, GCRYCTL_GET_ALGO_NSKEY, NULL, &n ))
n = 0;
return n;
@@ -1352,6 +1356,8 @@ pubkey_get_nsig( int algo )
if (algo == GCRY_PK_ELG_E)
algo = GCRY_PK_ELG;
+ if (algo == GCRY_PK_RSA_E || algo == GCRY_PK_RSA_S)
+ algo = GCRY_PK_RSA;
if (gcry_pk_algo_info( algo, GCRYCTL_GET_ALGO_NSIGN, NULL, &n))
n = 0;
return n;
@@ -1365,6 +1371,8 @@ pubkey_get_nenc( int algo )
if (algo == GCRY_PK_ELG_E)
algo = GCRY_PK_ELG;
+ if (algo == GCRY_PK_RSA_E || algo == GCRY_PK_RSA_S)
+ algo = GCRY_PK_RSA;
if (gcry_pk_algo_info( algo, GCRYCTL_GET_ALGO_NENCR, NULL, &n ))
n = 0;
return n;