gpg2/gnupg-2.0.9-RSA_ES.patch
OBS User autobuild 169dd43074 Accepting request 24526 from Base:System
Copy from Base:System/gpg2 based on submit request 24526 from user puzel

OBS-URL: https://build.opensuse.org/request/show/24526
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gpg2?expand=0&rev=32
2009-11-16 17:35:33 +00:00

42 lines
1.4 KiB
Diff

# adds back support for deprecated RSA_E, RSA_S algorithms
Index: gnupg-2.0.13/g10/misc.c
===================================================================
--- gnupg-2.0.13.orig/g10/misc.c 2009-07-16 08:22:45.000000000 +0200
+++ gnupg-2.0.13/g10/misc.c 2009-11-13 13:19:39.000000000 +0100
@@ -1308,6 +1308,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;
@@ -1321,6 +1323,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;
@@ -1334,6 +1338,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;
@@ -1347,6 +1353,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;