40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
# adds back support for deprecated RSA_E, RSA_S algorithms
|
|
--- gnupg-2.0.9.orig/g10/misc.c
|
|
+++ gnupg-2.0.9/g10/misc.c
|
|
@@ -1285,6 +1285,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;
|
|
@@ -1298,6 +1300,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;
|
|
@@ -1311,6 +1315,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;
|
|
@@ -1324,6 +1330,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;
|