Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | rpmpgp.c: Add missing if defs around crypto implementations |
| 2 | |
| 3 | Without these, the system will error trying to find the correct crypto |
| 4 | library to use. |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
| 9 | |
| 10 | Index: rpm/rpmio/rpmpgp.c |
| 11 | =================================================================== |
| 12 | --- rpm.orig/rpmio/rpmpgp.c |
| 13 | +++ rpm/rpmio/rpmpgp.c |
| 14 | @@ -1339,16 +1339,26 @@ int pgpExportPubkey(pgpDig dig) |
| 15 | { |
| 16 | int rc = 0; /* assume failure */ |
| 17 | |
| 18 | +#if defined(WITH_BEECRYPT) |
| 19 | if (pgpImplVecs == &rpmbcImplVecs) |
| 20 | rc = rpmbcExportPubkey(dig); |
| 21 | +#endif |
| 22 | +#if defined(WITH_SSL) |
| 23 | if (pgpImplVecs == &rpmsslImplVecs) |
| 24 | rc = rpmsslExportPubkey(dig); |
| 25 | +#endif |
| 26 | +#if defined(WITH_NSS) |
| 27 | if (pgpImplVecs == &rpmnssImplVecs) |
| 28 | rc = rpmnssExportPubkey(dig); |
| 29 | +#endif |
| 30 | +#if defined(WITH_GCRYPT) |
| 31 | if (pgpImplVecs == &rpmgcImplVecs) |
| 32 | rc = rpmgcExportPubkey(dig); |
| 33 | +#endif |
| 34 | +#if defined(WITH_TOMCRYPT) |
| 35 | if (pgpImplVecs == &rpmltcImplVecs) |
| 36 | rc = rpmltcExportPubkey(dig); |
| 37 | +#endif |
| 38 | return rc; |
| 39 | } |
| 40 | |
| 41 | @@ -1356,16 +1366,26 @@ int pgpExportSignature(pgpDig dig, DIGES |
| 42 | { |
| 43 | int rc = 0; /* assume failure */ |
| 44 | |
| 45 | +#if defined(WITH_BEECRYPT) |
| 46 | if (pgpImplVecs == &rpmbcImplVecs) |
| 47 | rc = rpmbcExportSignature(dig, ctx); |
| 48 | +#endif |
| 49 | +#if defined(WITH_SSL) |
| 50 | if (pgpImplVecs == &rpmsslImplVecs) |
| 51 | rc = rpmsslExportSignature(dig, ctx); |
| 52 | +#endif |
| 53 | +#if defined(WITH_NSS) |
| 54 | if (pgpImplVecs == &rpmnssImplVecs) |
| 55 | rc = rpmnssExportSignature(dig, ctx); |
| 56 | +#endif |
| 57 | +#if defined(WITH_GCRYPT) |
| 58 | if (pgpImplVecs == &rpmgcImplVecs) |
| 59 | rc = rpmgcExportSignature(dig, ctx); |
| 60 | +#endif |
| 61 | +#if defined(WITH_TOMCRYPT) |
| 62 | if (pgpImplVecs == &rpmltcImplVecs) |
| 63 | rc = rpmltcExportSignature(dig, ctx); |
| 64 | +#endif |
| 65 | return rc; |
| 66 | } |
| 67 | |