else
opkg_msg(NOTICE, "Signature check failed.\n");
}
- if (err) {
+ if (err && !conf->force_signature) {
/* The signature was wrong so delete it */
opkg_msg(NOTICE, "Remove wrong Signature file.\n");
unlink (tmp_file_name);
if (opkg_verify_file (list_file_name, sig_file_name)){
opkg_msg(ERROR, "Failed to verify the signature of %s.\n",
list_file_name);
- return -1;
+ if (!conf->force_signature)
+ return -1;
}
}else{
opkg_msg(ERROR, "Signature file is missing for %s. "
"Perhaps you need to run 'opkg update'?\n",
pkg->name);
- return -1;
+ if (!conf->force_signature)
+ return -1;
}
free (lists_dir);
ARGS_OPT_NOCASE,
ARGS_OPT_AUTOREMOVE,
ARGS_OPT_CACHE,
+ ARGS_OPT_FORCE_SIGNATURE,
};
static struct option long_options[] = {
{"force_remove", 0, 0, ARGS_OPT_FORCE_REMOVE},
{"force-checksum", 0, 0, ARGS_OPT_FORCE_CHECKSUM},
{"force_checksum", 0, 0, ARGS_OPT_FORCE_CHECKSUM},
+ {"force-signature", 0, 0, ARGS_OPT_FORCE_SIGNATURE},
+ {"force_signature", 0, 0, ARGS_OPT_FORCE_SIGNATURE},
{"noaction", 0, 0, ARGS_OPT_NOACTION},
{"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
{"nodeps", 0, 0, ARGS_OPT_NODEPS},
case ARGS_OPT_DOWNLOAD_ONLY:
conf->download_only = 1;
break;
+ case ARGS_OPT_FORCE_SIGNATURE:
+ conf->force_signature = 1;
+ break;
case ':':
parse_err = -1;
break;