{"size", OPKG_OPT_TYPE_BOOL, &_conf.size},
{"tmp_dir", OPKG_OPT_TYPE_STRING, &_conf.tmp_dir},
{"verbosity", OPKG_OPT_TYPE_INT, &_conf.verbosity},
+ {"verify_program", OPKG_OPT_TYPE_STRING, &_conf.verify_program},
{NULL, 0, NULL}
};
if (conf->lists_dir == NULL)
conf->lists_dir = xstrdup(OPKG_CONF_LISTS_DIR);
+ if (conf->verify_program == NULL)
+ conf->verify_program = xstrdup(OPKG_CONF_DEFAULT_VERIFY_PROGRAM);
+
if (conf->offline_root) {
sprintf_alloc(&tmp, "%s/%s", conf->offline_root,
conf->lists_dir);
#define OPKG_CONF_DEFAULT_CONF_FILE_DIR OPKGETCDIR"/opkg"
+#define OPKG_CONF_DEFAULT_VERIFY_PROGRAM "/usr/sbin/opkg-key"
+
/* In case the config file defines no dest */
#define OPKG_CONF_DEFAULT_DEST_NAME "root"
#define OPKG_CONF_DEFAULT_DEST_ROOT_DIR "/"
char *overlay_root;
int query_all;
int verbosity;
+ char *verify_program;
int noaction;
int size;
int download_only;
int opkg_verify_file(char *text_file, char *sig_file)
{
#if defined HAVE_USIGN
- const char *argv[] = { "/usr/sbin/opkg-key", "verify", sig_file,
+ const char *argv[] = { conf->verify_program, "verify", sig_file,
text_file, NULL };
return xsystem(argv) ? -1 : 0;
ARGS_OPT_CACHE,
ARGS_OPT_FORCE_SIGNATURE,
ARGS_OPT_NO_CHECK_CERTIFICATE,
+ ARGS_OPT_VERIFY_PROGRAM,
ARGS_OPT_SIZE,
};
{"lists-dir", 1, 0, 'l'},
{"lists_dir", 1, 0, 'l'},
{"verbosity", 2, 0, 'V'},
+ {"verify-program", 1, 0, ARGS_OPT_VERIFY_PROGRAM},
+ {"verify_program", 1, 0, ARGS_OPT_VERIFY_PROGRAM},
{"version", 0, 0, 'v'},
{0, 0, 0, 0}
};
case ARGS_OPT_NO_CHECK_CERTIFICATE:
conf->no_check_certificate = 1;
break;
+ case ARGS_OPT_VERIFY_PROGRAM:
+ conf->verify_program = xstrdup(optarg);
+ break;
case ':':
parse_err = -1;
break;
printf(" directory name in a pinch).\n");
printf("\t-o <dir> Use <dir> as the root directory for\n");
printf("\t--offline-root <dir> offline installation of packages.\n");
+ printf
+ ("\t--verify-program <path> Use the given program to verify usign signatures\n");
printf
("\t--add-arch <arch>:<prio> Register architecture with given priority\n");
printf