aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2023-03-24 16:00:46 +0000
committerAlex Dupre <ale@FreeBSD.org>2023-03-24 16:01:25 +0000
commitbe307c813ec5a5607ac637d46e9310277b10ea8e (patch)
treea69d2c73d62bf49784bb19de73be08db9a869689 /security
parent68b8e0027d365f2e5f8085f6cc820bc78524c7be (diff)
Diffstat (limited to 'security')
-rw-r--r--security/opensc/files/patch-src_tools_cardos-tool.c50
-rw-r--r--security/opensc/files/patch-src_tools_netkey-tool.c26
2 files changed, 76 insertions, 0 deletions
diff --git a/security/opensc/files/patch-src_tools_cardos-tool.c b/security/opensc/files/patch-src_tools_cardos-tool.c
new file mode 100644
index 000000000000..3e0519b10d0d
--- /dev/null
+++ b/security/opensc/files/patch-src_tools_cardos-tool.c
@@ -0,0 +1,50 @@
+--- src/tools/cardos-tool.c.orig 2023-03-24 14:20:46 UTC
++++ src/tools/cardos-tool.c
+@@ -1143,7 +1143,6 @@ int main(int argc, char *argv[])
+ int do_info = 0;
+ int do_format = 0;
+ int do_change_startkey = 0;
+- int action_count = 0;
+ const char *opt_startkey = NULL;
+ const char *opt_change_startkey = NULL;
+ sc_context_param_t ctx_param;
+@@ -1155,11 +1154,9 @@ int main(int argc, char *argv[])
+ util_print_usage_and_die(app_name, options, option_help, NULL);
+ case 'i':
+ do_info = 1;
+- action_count++;
+ break;
+ case 'f':
+ do_format = 1;
+- action_count++;
+ break;
+ case 's':
+ opt_startkey = optarg;
+@@ -1167,7 +1164,6 @@ int main(int argc, char *argv[])
+ case 'S':
+ do_change_startkey = 1;
+ opt_change_startkey = optarg;
+- action_count++;
+ break;
+ case 'r':
+ opt_reader = optarg;
+@@ -1217,19 +1213,16 @@ int main(int argc, char *argv[])
+ if ((err = cardos_info())) {
+ goto end;
+ }
+- action_count--;
+ }
+ if (do_change_startkey) {
+ if ((err = cardos_change_startkey(opt_change_startkey))) {
+ goto end;
+ }
+- action_count--;
+ }
+ if (do_format) {
+ if ((err = cardos_format(opt_startkey))) {
+ goto end;
+ }
+- action_count--;
+ }
+ end:
+ if (card) {
diff --git a/security/opensc/files/patch-src_tools_netkey-tool.c b/security/opensc/files/patch-src_tools_netkey-tool.c
new file mode 100644
index 000000000000..069500a1d4a8
--- /dev/null
+++ b/security/opensc/files/patch-src_tools_netkey-tool.c
@@ -0,0 +1,26 @@
+--- src/tools/netkey-tool.c.orig 2023-03-24 14:58:28 UTC
++++ src/tools/netkey-tool.c
+@@ -443,13 +443,12 @@ int main(
+ int do_help=0, do_unblock=0, do_change=0, do_nullpin=0, do_readcert=0, do_writecert=0;
+ u8 newpin[32];
+ char *certfile=NULL, *p;
+- int r, oerr=0, reader=0, debug=0, pin_nr=-1, cert_nr=-1;
++ int r, oerr=0, reader=0, pin_nr=-1, cert_nr=-1;
+ size_t i, newlen=0;
+
+- while ((r = getopt_long(argc, argv, "hvr:p:u:0:1:", options, NULL)) != -1) {
++ while ((r = getopt_long(argc, argv, "hr:p:u:0:1:", options, NULL)) != -1) {
+ switch (r) {
+ case 'h': ++do_help; break;
+- case 'v': ++debug; break;
+ case 'r': reader=atoi(optarg); break;
+ case 'p': set_pin(pinlist[0].value, &pinlist[0].len, optarg); break;
+ case 'u': set_pin(pinlist[1].value, &pinlist[1].len, optarg); break;
+@@ -462,7 +461,6 @@ int main(
+ fprintf(stderr,"This is netkey-tool V1.0, May 15 2005, Copyright Peter Koch <pk_opensc@web.de>\n");
+ fprintf(stderr,"usage: %s <options> command\n", argv[0]);
+ fprintf(stderr,"\nOptions:\n");
+- fprintf(stderr," -v : verbose, may be specified several times\n");
+ fprintf(stderr," --reader <num>, -r <num> : use reader num (default 0)\n");
+ fprintf(stderr," --pin <pin>, -p <pin> : current value of global PIN\n");
+ fprintf(stderr," --puk <pin>, -u <pin> : current value of global PUK\n");