aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch
blob: fcbc25df0ea530827dd6a0c5261f85ac3d2cd1e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
rpmpgp.c: Add missing if defs around crypto implementations

Without these, the system will error trying to find the correct crypto 
library to use.

Upstream-status: Pending

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

Index: rpm/rpmio/rpmpgp.c
===================================================================
--- rpm.orig/rpmio/rpmpgp.c
+++ rpm/rpmio/rpmpgp.c
@@ -1339,16 +1339,26 @@ int pgpExportPubkey(pgpDig dig)
 {
     int rc = 0;		/* assume failure */
 
+#if defined(WITH_BEECRYPT)
     if (pgpImplVecs == &rpmbcImplVecs)
 	rc = rpmbcExportPubkey(dig);
+#endif
+#if defined(WITH_SSL)
     if (pgpImplVecs == &rpmsslImplVecs)
 	rc = rpmsslExportPubkey(dig);
+#endif
+#if defined(WITH_NSS)
     if (pgpImplVecs == &rpmnssImplVecs)
 	rc = rpmnssExportPubkey(dig);
+#endif
+#if defined(WITH_GCRYPT)
     if (pgpImplVecs == &rpmgcImplVecs)
 	rc = rpmgcExportPubkey(dig);
+#endif
+#if defined(WITH_TOMCRYPT)
     if (pgpImplVecs == &rpmltcImplVecs)
 	rc = rpmltcExportPubkey(dig);
+#endif
     return rc;
 }
 
@@ -1356,16 +1366,26 @@ int pgpExportSignature(pgpDig dig, DIGES
 {
     int rc = 0;		/* assume failure */
 
+#if defined(WITH_BEECRYPT)
     if (pgpImplVecs == &rpmbcImplVecs)
 	rc = rpmbcExportSignature(dig, ctx);
+#endif
+#if defined(WITH_SSL)
     if (pgpImplVecs == &rpmsslImplVecs)
 	rc = rpmsslExportSignature(dig, ctx);
+#endif
+#if defined(WITH_NSS)
     if (pgpImplVecs == &rpmnssImplVecs)
 	rc = rpmnssExportSignature(dig, ctx);
+#endif
+#if defined(WITH_GCRYPT)
     if (pgpImplVecs == &rpmgcImplVecs)
 	rc = rpmgcExportSignature(dig, ctx);
+#endif
+#if defined(WITH_TOMCRYPT)
     if (pgpImplVecs == &rpmltcImplVecs)
 	rc = rpmltcExportSignature(dig, ctx);
+#endif
     return rc;
 }