projects
/
oweals
/
opkg-lede.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
opkg: make gpg support optional
[oweals/opkg-lede.git]
/
opkg_download.c
diff --git
a/opkg_download.c
b/opkg_download.c
index 2bdbb00cae92537c75ca2a5df3ab96b4788c1160..2f87eec81f850f3ad89f5ac8d9ffe3070d029174 100644
(file)
--- a/
opkg_download.c
+++ b/
opkg_download.c
@@
-23,6
+23,7
@@
#include "opkg.h"
#include "opkg_download.h"
#include "opkg_message.h"
#include "opkg.h"
#include "opkg_download.h"
#include "opkg_message.h"
+#include "opkg_state.h"
#include "sprintf_alloc.h"
#include "xsystem.h"
#include "sprintf_alloc.h"
#include "xsystem.h"
@@
-296,6
+297,7
@@
int opkg_prepare_url_for_install(opkg_conf_t *conf, const char *url, char **name
int
opkg_verify_file (char *text_file, char *sig_file)
{
int
opkg_verify_file (char *text_file, char *sig_file)
{
+#ifdef HAVE_GPGME
int status = -1;
gpgme_ctx_t ctx;
gpgme_data_t sig, text;
int status = -1;
gpgme_ctx_t ctx;
gpgme_data_t sig, text;
@@
-335,4
+337,8
@@
opkg_verify_file (char *text_file, char *sig_file)
gpgme_release (ctx);
return status;
gpgme_release (ctx);
return status;
+#else
+ printf ("Signature check skipped because GPG support was not enabled in this build\n");
+ return 0;
+#endif
}
}