X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=src%2Fopkg-cl.c;h=a3ea5c139aa2221c0075796ead72212c731a66a6;hp=29072313929f9602bb97bb6fd6bf0fefcdd6cf68;hb=d1fe095d2c1463ca1e945028b15f57a256070a06;hpb=021ed5c3deec5ae89b47acdd74f9e2c7894ce2e0 diff --git a/src/opkg-cl.c b/src/opkg-cl.c index 2907231..a3ea5c1 100644 --- a/src/opkg-cl.c +++ b/src/opkg-cl.c @@ -20,8 +20,6 @@ */ #define _GNU_SOURCE -#include "config.h" - #include #include #include @@ -54,6 +52,7 @@ enum { ARGS_OPT_AUTOREMOVE, ARGS_OPT_CACHE, ARGS_OPT_FORCE_SIGNATURE, + ARGS_OPT_NO_CHECK_CERTIFICATE, ARGS_OPT_SIZE, }; @@ -93,6 +92,8 @@ static struct option long_options[] = { {"force_checksum", 0, 0, ARGS_OPT_FORCE_CHECKSUM}, {"force-signature", 0, 0, ARGS_OPT_FORCE_SIGNATURE}, {"force_signature", 0, 0, ARGS_OPT_FORCE_SIGNATURE}, + {"no-check-certificate", 0, 0, ARGS_OPT_NO_CHECK_CERTIFICATE}, + {"no_check_certificate", 0, 0, ARGS_OPT_NO_CHECK_CERTIFICATE}, {"noaction", 0, 0, ARGS_OPT_NOACTION}, {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY}, {"nodeps", 0, 0, ARGS_OPT_NODEPS}, @@ -228,6 +229,9 @@ static int args_parse(int argc, char *argv[]) case ARGS_OPT_FORCE_SIGNATURE: conf->force_signature = 1; break; + case ARGS_OPT_NO_CHECK_CERTIFICATE: + conf->no_check_certificate = 1; + break; case ':': parse_err = -1; break; @@ -337,6 +341,7 @@ static void usage() printf ("\t--force-remove Remove package even if prerm script fails\n"); printf("\t--force-checksum Don't fail on checksum mismatches\n"); + printf("\t--no-check-certificate Don't validate SSL certificates\n"); printf("\t--noaction No action -- test only\n"); printf("\t--download-only No action -- download only\n"); printf("\t--nodeps Do not follow dependencies\n"); @@ -393,7 +398,9 @@ int main(int argc, char *argv[]) !strcmp(cmd_name, "print-architecture") || !strcmp(cmd_name, "print_architecture") || !strcmp(cmd_name, "print-installation-architecture") || - !strcmp(cmd_name, "print_installation_architecture")) + !strcmp(cmd_name, "print_installation_architecture") || + !strcmp(cmd_name, "compare_versions") || + !strcmp(cmd_name, "compare-versions")) nocheckfordirorfile = 1; if (!strcmp(cmd_name, "flag") || @@ -402,8 +409,6 @@ int main(int argc, char *argv[]) !strcmp(cmd_name, "remove") || !strcmp(cmd_name, "files") || !strcmp(cmd_name, "search") || - !strcmp(cmd_name, "compare_versions") || - !strcmp(cmd_name, "compare-versions") || !strcmp(cmd_name, "list_installed") || !strcmp(cmd_name, "list-installed") || !strcmp(cmd_name, "list_changed_conffiles") || @@ -442,9 +447,6 @@ int main(int argc, char *argv[]) err = opkg_cmd_exec(cmd, argc - opts, (const char **)(argv + opts)); -#ifdef HAVE_CURL - opkg_curl_cleanup(); -#endif err1: opkg_conf_deinit();