3 @@ -169,6 +169,15 @@ if test "x$want_gpgme" = "xyes"; then
8 + AC_HELP_STRING([--enable-usign], [Enable signature checking with usign
10 + [want_usign="$enableval"], [want_usign="yes"])
12 +if test "x$want_usign" = "xyes"; then
13 + AC_DEFINE(HAVE_USIGN, 1, [Define if you want usign support])
16 AC_SUBST(GPGME_CFLAGS)
21 @@ -599,7 +599,7 @@ opkg_update_package_lists(opkg_progress_
25 -#if defined(HAVE_GPGME) || defined(HAVE_OPENSSL)
26 +#if defined(HAVE_GPGME) || defined(HAVE_OPENSSL) || defined(HAVE_USIGN)
27 if (conf->check_signature) {
29 /* download detached signitures to verify the package lists */
30 --- a/libopkg/opkg_cmd.c
31 +++ b/libopkg/opkg_cmd.c
32 @@ -169,7 +169,7 @@ opkg_update_cmd(int argc, char **argv)
36 -#if defined(HAVE_GPGME) || defined(HAVE_OPENSSL)
37 +#if defined(HAVE_GPGME) || defined(HAVE_OPENSSL) || defined(HAVE_USIGN)
38 if (conf->check_signature) {
39 /* download detached signitures to verify the package lists */
40 /* get the url for the sig file */
41 --- a/libopkg/opkg_install.c
42 +++ b/libopkg/opkg_install.c
43 @@ -1288,7 +1288,7 @@ opkg_install_pkg(pkg_t *pkg, int from_up
46 /* check that the repository is valid */
47 - #if defined(HAVE_GPGME) || defined(HAVE_OPENSSL)
48 + #if defined(HAVE_GPGME) || defined(HAVE_OPENSSL) || defined(HAVE_USIGN)
49 char *list_file_name, *sig_file_name, *lists_dir;
51 /* check to ensure the package has come from a repository */
52 --- a/libopkg/opkg_download.c
53 +++ b/libopkg/opkg_download.c
58 +#include <sys/wait.h>
62 @@ -342,7 +343,28 @@ opkg_prepare_url_for_install(const char
64 opkg_verify_file (char *text_file, char *sig_file)
66 -#if defined HAVE_GPGME
67 +#if defined HAVE_USIGN
71 + if (conf->check_signature == 0 )
79 + execl("/usr/sbin/opkg-key", "opkg-key", "verify", sig_file, text_file, NULL);
83 + waitpid(pid, &status, 0);
84 + if (!WIFEXITED(status) || WEXITSTATUS(status))
88 +#elif defined HAVE_GPGME
89 if (conf->check_signature == 0 )