summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguenther <>2019-07-14 03:30:46 +0000
committerguenther <>2019-07-14 03:30:46 +0000
commitbc8d7db132e8ba050dd6707a72cea5d3b6976e03 (patch)
tree5082b2b4a1bbd244a864f580178d406f6a694e72
parent7e286c6ee458c5d54810f9952a2a61b1bc9538bc (diff)
downloadopenbsd-bc8d7db132e8ba050dd6707a72cea5d3b6976e03.tar.gz
openbsd-bc8d7db132e8ba050dd6707a72cea5d3b6976e03.tar.bz2
openbsd-bc8d7db132e8ba050dd6707a72cea5d3b6976e03.zip
Mark the initialized struct options arrays as both static and const.
This moves them from .data to .data.rel.ro ok deraadt@ inoguchi@
-rw-r--r--src/usr.bin/openssl/apps.c8
-rw-r--r--src/usr.bin/openssl/apps.h8
-rw-r--r--src/usr.bin/openssl/asn1pars.c4
-rw-r--r--src/usr.bin/openssl/certhash.c2
-rw-r--r--src/usr.bin/openssl/ciphers.c4
-rw-r--r--src/usr.bin/openssl/crl.c4
-rw-r--r--src/usr.bin/openssl/crl2p7.c4
-rw-r--r--src/usr.bin/openssl/dh.c4
-rw-r--r--src/usr.bin/openssl/dhparam.c4
-rw-r--r--src/usr.bin/openssl/dsa.c4
-rw-r--r--src/usr.bin/openssl/dsaparam.c4
-rw-r--r--src/usr.bin/openssl/ec.c4
-rw-r--r--src/usr.bin/openssl/ecparam.c4
-rw-r--r--src/usr.bin/openssl/enc.c4
-rw-r--r--src/usr.bin/openssl/errstr.c4
-rw-r--r--src/usr.bin/openssl/gendh.c4
-rw-r--r--src/usr.bin/openssl/gendsa.c4
-rw-r--r--src/usr.bin/openssl/genpkey.c4
-rw-r--r--src/usr.bin/openssl/genrsa.c4
-rw-r--r--src/usr.bin/openssl/nseq.c4
-rw-r--r--src/usr.bin/openssl/passwd.c4
-rw-r--r--src/usr.bin/openssl/pkcs7.c4
-rw-r--r--src/usr.bin/openssl/pkcs8.c4
-rw-r--r--src/usr.bin/openssl/pkey.c4
-rw-r--r--src/usr.bin/openssl/pkeyparam.c4
-rw-r--r--src/usr.bin/openssl/pkeyutl.c4
-rw-r--r--src/usr.bin/openssl/prime.c4
-rw-r--r--src/usr.bin/openssl/rand.c4
-rw-r--r--src/usr.bin/openssl/rsa.c4
-rw-r--r--src/usr.bin/openssl/rsautl.c4
-rw-r--r--src/usr.bin/openssl/s_time.c4
-rw-r--r--src/usr.bin/openssl/sess_id.c4
-rw-r--r--src/usr.bin/openssl/spkac.c4
-rw-r--r--src/usr.bin/openssl/version.c4
34 files changed, 71 insertions, 71 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c
index 39ce7a5f34..c9a2f34b25 100644
--- a/src/usr.bin/openssl/apps.c
+++ b/src/usr.bin/openssl/apps.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: apps.c,v 1.53 2019/07/03 03:24:02 deraadt Exp $ */ 1/* $OpenBSD: apps.c,v 1.54 2019/07/14 03:30:45 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -2122,7 +2122,7 @@ app_isdir(const char *name)
2122#define OPTION_WIDTH 18 2122#define OPTION_WIDTH 18
2123 2123
2124void 2124void
2125options_usage(struct option *opts) 2125options_usage(const struct option *opts)
2126{ 2126{
2127 const char *p, *q; 2127 const char *p, *q;
2128 char optstr[32]; 2128 char optstr[32];
@@ -2149,11 +2149,11 @@ options_usage(struct option *opts)
2149} 2149}
2150 2150
2151int 2151int
2152options_parse(int argc, char **argv, struct option *opts, char **unnamed, 2152options_parse(int argc, char **argv, const struct option *opts, char **unnamed,
2153 int *argsused) 2153 int *argsused)
2154{ 2154{
2155 const char *errstr; 2155 const char *errstr;
2156 struct option *opt; 2156 const struct option *opt;
2157 long long val; 2157 long long val;
2158 char *arg, *p; 2158 char *arg, *p;
2159 int fmt, used; 2159 int fmt, used;
diff --git a/src/usr.bin/openssl/apps.h b/src/usr.bin/openssl/apps.h
index bb2340a545..48e5ba3adb 100644
--- a/src/usr.bin/openssl/apps.h
+++ b/src/usr.bin/openssl/apps.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: apps.h,v 1.22 2019/02/09 06:27:37 inoguchi Exp $ */ 1/* $OpenBSD: apps.h,v 1.23 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -317,9 +317,9 @@ struct option {
317 const int value; 317 const int value;
318}; 318};
319 319
320void options_usage(struct option *opts); 320void options_usage(const struct option *opts);
321int options_parse(int argc, char **argv, struct option *opts, char **unnamed, 321int options_parse(int argc, char **argv, const struct option *opts,
322 int *argsused); 322 char **unnamed, int *argsused);
323 323
324void show_cipher(const OBJ_NAME *name, void *arg); 324void show_cipher(const OBJ_NAME *name, void *arg);
325 325
diff --git a/src/usr.bin/openssl/asn1pars.c b/src/usr.bin/openssl/asn1pars.c
index a17584e8a3..18f8a48c29 100644
--- a/src/usr.bin/openssl/asn1pars.c
+++ b/src/usr.bin/openssl/asn1pars.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1pars.c,v 1.9 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: asn1pars.c,v 1.10 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -126,7 +126,7 @@ asn1pars_opt_strparse(char *arg)
126 return (0); 126 return (0);
127} 127}
128 128
129static struct option asn1pars_options[] = { 129static const struct option asn1pars_options[] = {
130 { 130 {
131 .name = "dump", 131 .name = "dump",
132 .desc = "Dump unknown data in hex form", 132 .desc = "Dump unknown data in hex form",
diff --git a/src/usr.bin/openssl/certhash.c b/src/usr.bin/openssl/certhash.c
index 5838f0209b..5125380413 100644
--- a/src/usr.bin/openssl/certhash.c
+++ b/src/usr.bin/openssl/certhash.c
@@ -37,7 +37,7 @@ static struct {
37 int verbose; 37 int verbose;
38} certhash_config; 38} certhash_config;
39 39
40struct option certhash_options[] = { 40static const struct option certhash_options[] = {
41 { 41 {
42 .name = "n", 42 .name = "n",
43 .desc = "Perform a dry-run - do not make any changes", 43 .desc = "Perform a dry-run - do not make any changes",
diff --git a/src/usr.bin/openssl/ciphers.c b/src/usr.bin/openssl/ciphers.c
index 2b8ad5ba85..a20f19c3af 100644
--- a/src/usr.bin/openssl/ciphers.c
+++ b/src/usr.bin/openssl/ciphers.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ciphers.c,v 1.9 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: ciphers.c,v 1.10 2019/07/14 03:30:45 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -29,7 +29,7 @@ struct {
29 int verbose; 29 int verbose;
30} ciphers_config; 30} ciphers_config;
31 31
32struct option ciphers_options[] = { 32static const struct option ciphers_options[] = {
33 { 33 {
34 .name = "h", 34 .name = "h",
35 .type = OPTION_FLAG, 35 .type = OPTION_FLAG,
diff --git a/src/usr.bin/openssl/crl.c b/src/usr.bin/openssl/crl.c
index cb1c18fa40..fc189f4c3f 100644
--- a/src/usr.bin/openssl/crl.c
+++ b/src/usr.bin/openssl/crl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: crl.c,v 1.12 2019/01/19 21:17:05 jsg Exp $ */ 1/* $OpenBSD: crl.c,v 1.13 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -88,7 +88,7 @@ static struct {
88 int verify; 88 int verify;
89} crl_config; 89} crl_config;
90 90
91static struct option crl_options[] = { 91static const struct option crl_options[] = {
92 { 92 {
93 .name = "CAfile", 93 .name = "CAfile",
94 .argname = "file", 94 .argname = "file",
diff --git a/src/usr.bin/openssl/crl2p7.c b/src/usr.bin/openssl/crl2p7.c
index a9c48a3da0..8e5bf6a436 100644
--- a/src/usr.bin/openssl/crl2p7.c
+++ b/src/usr.bin/openssl/crl2p7.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: crl2p7.c,v 1.8 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: crl2p7.c,v 1.9 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -102,7 +102,7 @@ crl2p7_opt_certfile(char *arg)
102 return (0); 102 return (0);
103} 103}
104 104
105static struct option crl2p7_options[] = { 105static const struct option crl2p7_options[] = {
106 { 106 {
107 .name = "certfile", 107 .name = "certfile",
108 .argname = "file", 108 .argname = "file",
diff --git a/src/usr.bin/openssl/dh.c b/src/usr.bin/openssl/dh.c
index 827ca9c7ea..9557d15a3f 100644
--- a/src/usr.bin/openssl/dh.c
+++ b/src/usr.bin/openssl/dh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.c,v 1.11 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: dh.c,v 1.12 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -85,7 +85,7 @@ static struct {
85 int text; 85 int text;
86} dh_config; 86} dh_config;
87 87
88static struct option dh_options[] = { 88static const struct option dh_options[] = {
89 { 89 {
90 .name = "C", 90 .name = "C",
91 .desc = "Convert DH parameters into C code", 91 .desc = "Convert DH parameters into C code",
diff --git a/src/usr.bin/openssl/dhparam.c b/src/usr.bin/openssl/dhparam.c
index f27a5c9e81..b0dd510949 100644
--- a/src/usr.bin/openssl/dhparam.c
+++ b/src/usr.bin/openssl/dhparam.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dhparam.c,v 1.11 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: dhparam.c,v 1.12 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -144,7 +144,7 @@ struct {
144 int text; 144 int text;
145} dhparam_config; 145} dhparam_config;
146 146
147struct option dhparam_options[] = { 147static const struct option dhparam_options[] = {
148 { 148 {
149 .name = "2", 149 .name = "2",
150 .desc = "Generate DH parameters with a generator value of 2 " 150 .desc = "Generate DH parameters with a generator value of 2 "
diff --git a/src/usr.bin/openssl/dsa.c b/src/usr.bin/openssl/dsa.c
index 494d49712e..1b5e302bd5 100644
--- a/src/usr.bin/openssl/dsa.c
+++ b/src/usr.bin/openssl/dsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa.c,v 1.14 2019/07/10 10:28:28 inoguchi Exp $ */ 1/* $OpenBSD: dsa.c,v 1.15 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -105,7 +105,7 @@ dsa_opt_enc(int argc, char **argv, int *argsused)
105 return (1); 105 return (1);
106} 106}
107 107
108static struct option dsa_options[] = { 108static const struct option dsa_options[] = {
109 { 109 {
110 .name = "in", 110 .name = "in",
111 .argname = "file", 111 .argname = "file",
diff --git a/src/usr.bin/openssl/dsaparam.c b/src/usr.bin/openssl/dsaparam.c
index 8b189cf559..3c2ac89800 100644
--- a/src/usr.bin/openssl/dsaparam.c
+++ b/src/usr.bin/openssl/dsaparam.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsaparam.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: dsaparam.c,v 1.11 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -90,7 +90,7 @@ static struct {
90 int text; 90 int text;
91} dsaparam_config; 91} dsaparam_config;
92 92
93static struct option dsaparam_options[] = { 93static const struct option dsaparam_options[] = {
94 { 94 {
95 .name = "C", 95 .name = "C",
96 .desc = "Convert DSA parameters into C code", 96 .desc = "Convert DSA parameters into C code",
diff --git a/src/usr.bin/openssl/ec.c b/src/usr.bin/openssl/ec.c
index f9056154ed..3aa9b0c2c5 100644
--- a/src/usr.bin/openssl/ec.c
+++ b/src/usr.bin/openssl/ec.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec.c,v 1.13 2019/02/09 15:49:21 inoguchi Exp $ */ 1/* $OpenBSD: ec.c,v 1.14 2019/07/14 03:30:45 guenther Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -140,7 +140,7 @@ ec_opt_named(char *arg)
140 return (0); 140 return (0);
141} 141}
142 142
143static struct option ec_options[] = { 143static const struct option ec_options[] = {
144 { 144 {
145 .name = "conv_form", 145 .name = "conv_form",
146 .argname = "form", 146 .argname = "form",
diff --git a/src/usr.bin/openssl/ecparam.c b/src/usr.bin/openssl/ecparam.c
index b1e52fadaf..7bacd37ec5 100644
--- a/src/usr.bin/openssl/ecparam.c
+++ b/src/usr.bin/openssl/ecparam.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecparam.c,v 1.17 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: ecparam.c,v 1.18 2019/07/14 03:30:45 guenther Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -139,7 +139,7 @@ ecparam_opt_enctype(char *arg)
139 return (0); 139 return (0);
140} 140}
141 141
142struct option ecparam_options[] = { 142static const struct option ecparam_options[] = {
143 { 143 {
144 .name = "C", 144 .name = "C",
145 .desc = "Convert the EC parameters into C code", 145 .desc = "Convert the EC parameters into C code",
diff --git a/src/usr.bin/openssl/enc.c b/src/usr.bin/openssl/enc.c
index 4de92bd636..8518ff4c9d 100644
--- a/src/usr.bin/openssl/enc.c
+++ b/src/usr.bin/openssl/enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: enc.c,v 1.20 2019/04/01 16:06:54 jsing Exp $ */ 1/* $OpenBSD: enc.c,v 1.21 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -124,7 +124,7 @@ enc_opt_cipher(int argc, char **argv, int *argsused)
124 return (1); 124 return (1);
125} 125}
126 126
127static struct option enc_options[] = { 127static const struct option enc_options[] = {
128 { 128 {
129 .name = "A", 129 .name = "A",
130 .desc = "Process base64 data on one line (requires -a)", 130 .desc = "Process base64 data on one line (requires -a)",
diff --git a/src/usr.bin/openssl/errstr.c b/src/usr.bin/openssl/errstr.c
index 0d31d4fc85..bb6bfc785f 100644
--- a/src/usr.bin/openssl/errstr.c
+++ b/src/usr.bin/openssl/errstr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: errstr.c,v 1.6 2015/10/17 15:00:11 doug Exp $ */ 1/* $OpenBSD: errstr.c,v 1.7 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -72,7 +72,7 @@ struct {
72 int stats; 72 int stats;
73} errstr_config; 73} errstr_config;
74 74
75struct option errstr_options[] = { 75static const struct option errstr_options[] = {
76 { 76 {
77 .name = "stats", 77 .name = "stats",
78 .desc = "Print debugging statistics for the hash table", 78 .desc = "Print debugging statistics for the hash table",
diff --git a/src/usr.bin/openssl/gendh.c b/src/usr.bin/openssl/gendh.c
index 18ff504e44..facc9248f3 100644
--- a/src/usr.bin/openssl/gendh.c
+++ b/src/usr.bin/openssl/gendh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gendh.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: gendh.c,v 1.11 2019/07/14 03:30:45 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -91,7 +91,7 @@ static struct {
91 char *outfile; 91 char *outfile;
92} gendh_config; 92} gendh_config;
93 93
94static struct option gendh_options[] = { 94static const struct option gendh_options[] = {
95 { 95 {
96 .name = "2", 96 .name = "2",
97 .desc = "Generate DH parameters with a generator value of 2 " 97 .desc = "Generate DH parameters with a generator value of 2 "
diff --git a/src/usr.bin/openssl/gendsa.c b/src/usr.bin/openssl/gendsa.c
index f2e155128c..4eb0b1f44d 100644
--- a/src/usr.bin/openssl/gendsa.c
+++ b/src/usr.bin/openssl/gendsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gendsa.c,v 1.11 2019/06/07 02:32:22 inoguchi Exp $ */ 1/* $OpenBSD: gendsa.c,v 1.12 2019/07/14 03:30:46 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -83,7 +83,7 @@ static struct {
83 char *passargout; 83 char *passargout;
84} gendsa_config; 84} gendsa_config;
85 85
86static struct option gendsa_options[] = { 86static const struct option gendsa_options[] = {
87#ifndef OPENSSL_NO_AES 87#ifndef OPENSSL_NO_AES
88 { 88 {
89 .name = "aes128", 89 .name = "aes128",
diff --git a/src/usr.bin/openssl/genpkey.c b/src/usr.bin/openssl/genpkey.c
index ef16a5e0da..e2b46b7796 100644
--- a/src/usr.bin/openssl/genpkey.c
+++ b/src/usr.bin/openssl/genpkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: genpkey.c,v 1.12 2018/02/08 11:17:44 jsing Exp $ */ 1/* $OpenBSD: genpkey.c,v 1.13 2019/07/14 03:30:46 guenther Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006 3 * project 2006
4 */ 4 */
@@ -141,7 +141,7 @@ genpkey_opt_pkeyopt(char *arg)
141 return (0); 141 return (0);
142} 142}
143 143
144struct option genpkey_options[] = { 144static const struct option genpkey_options[] = {
145 { 145 {
146 .name = "algorithm", 146 .name = "algorithm",
147 .argname = "name", 147 .argname = "name",
diff --git a/src/usr.bin/openssl/genrsa.c b/src/usr.bin/openssl/genrsa.c
index 63d3de4218..d7cd6b0528 100644
--- a/src/usr.bin/openssl/genrsa.c
+++ b/src/usr.bin/openssl/genrsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: genrsa.c,v 1.14 2019/07/09 11:02:52 inoguchi Exp $ */ 1/* $OpenBSD: genrsa.c,v 1.15 2019/07/14 03:30:46 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -157,7 +157,7 @@ set_enc(int argc, char **argv, int *argsused)
157 return (0); 157 return (0);
158} 158}
159 159
160static struct option genrsa_options[] = { 160static const struct option genrsa_options[] = {
161 { 161 {
162 .name = "3", 162 .name = "3",
163 .desc = "Use 3 for the E value", 163 .desc = "Use 3 for the E value",
diff --git a/src/usr.bin/openssl/nseq.c b/src/usr.bin/openssl/nseq.c
index d50bace12f..516bde34d2 100644
--- a/src/usr.bin/openssl/nseq.c
+++ b/src/usr.bin/openssl/nseq.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: nseq.c,v 1.8 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: nseq.c,v 1.9 2019/07/14 03:30:46 guenther Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -70,7 +70,7 @@ static struct {
70 int toseq; 70 int toseq;
71} nseq_config; 71} nseq_config;
72 72
73static struct option nseq_options[] = { 73static const struct option nseq_options[] = {
74 { 74 {
75 .name = "in", 75 .name = "in",
76 .argname = "file", 76 .argname = "file",
diff --git a/src/usr.bin/openssl/passwd.c b/src/usr.bin/openssl/passwd.c
index 428f75a7ca..4033b55372 100644
--- a/src/usr.bin/openssl/passwd.c
+++ b/src/usr.bin/openssl/passwd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: passwd.c,v 1.9 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: passwd.c,v 1.10 2019/07/14 03:30:46 guenther Exp $ */
2 2
3#if defined OPENSSL_NO_MD5 3#if defined OPENSSL_NO_MD5
4#define NO_MD5CRYPT_1 4#define NO_MD5CRYPT_1
@@ -53,7 +53,7 @@ static struct {
53 int usecrypt; 53 int usecrypt;
54} passwd_config; 54} passwd_config;
55 55
56static struct option passwd_options[] = { 56static const struct option passwd_options[] = {
57#ifndef NO_MD5CRYPT_1 57#ifndef NO_MD5CRYPT_1
58 { 58 {
59 .name = "1", 59 .name = "1",
diff --git a/src/usr.bin/openssl/pkcs7.c b/src/usr.bin/openssl/pkcs7.c
index f1edc9e489..4c184911c9 100644
--- a/src/usr.bin/openssl/pkcs7.c
+++ b/src/usr.bin/openssl/pkcs7.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs7.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: pkcs7.c,v 1.11 2019/07/14 03:30:46 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -81,7 +81,7 @@ static struct {
81 int text; 81 int text;
82} pkcs7_config; 82} pkcs7_config;
83 83
84static struct option pkcs7_options[] = { 84static const struct option pkcs7_options[] = {
85 { 85 {
86 .name = "in", 86 .name = "in",
87 .argname = "file", 87 .argname = "file",
diff --git a/src/usr.bin/openssl/pkcs8.c b/src/usr.bin/openssl/pkcs8.c
index 7938bf8b09..0629b20c37 100644
--- a/src/usr.bin/openssl/pkcs8.c
+++ b/src/usr.bin/openssl/pkcs8.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs8.c,v 1.13 2018/08/24 22:56:45 jmc Exp $ */ 1/* $OpenBSD: pkcs8.c,v 1.14 2019/07/14 03:30:46 guenther Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999-2004. 3 * project 1999-2004.
4 */ 4 */
@@ -103,7 +103,7 @@ pkcs8_opt_v2(char *arg)
103 return (0); 103 return (0);
104} 104}
105 105
106static struct option pkcs8_options[] = { 106static const struct option pkcs8_options[] = {
107 { 107 {
108 .name = "in", 108 .name = "in",
109 .argname = "file", 109 .argname = "file",
diff --git a/src/usr.bin/openssl/pkey.c b/src/usr.bin/openssl/pkey.c
index fa88e55032..06b4c01894 100644
--- a/src/usr.bin/openssl/pkey.c
+++ b/src/usr.bin/openssl/pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkey.c,v 1.14 2019/02/09 15:49:21 inoguchi Exp $ */ 1/* $OpenBSD: pkey.c,v 1.15 2019/07/14 03:30:46 guenther Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006 3 * project 2006
4 */ 4 */
@@ -97,7 +97,7 @@ pkey_opt_cipher(int argc, char **argv, int *argsused)
97 return (0); 97 return (0);
98} 98}
99 99
100static struct option pkey_options[] = { 100static const struct option pkey_options[] = {
101 { 101 {
102 .name = "in", 102 .name = "in",
103 .argname = "file", 103 .argname = "file",
diff --git a/src/usr.bin/openssl/pkeyparam.c b/src/usr.bin/openssl/pkeyparam.c
index 51ea2b55fb..81bed13958 100644
--- a/src/usr.bin/openssl/pkeyparam.c
+++ b/src/usr.bin/openssl/pkeyparam.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkeyparam.c,v 1.11 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: pkeyparam.c,v 1.12 2019/07/14 03:30:46 guenther Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006 3 * project 2006
4 */ 4 */
@@ -72,7 +72,7 @@ struct {
72 int text; 72 int text;
73} pkeyparam_config; 73} pkeyparam_config;
74 74
75struct option pkeyparam_options[] = { 75static const struct option pkeyparam_options[] = {
76 { 76 {
77 .name = "in", 77 .name = "in",
78 .argname = "file", 78 .argname = "file",
diff --git a/src/usr.bin/openssl/pkeyutl.c b/src/usr.bin/openssl/pkeyutl.c
index b0800181b0..09a1a9755f 100644
--- a/src/usr.bin/openssl/pkeyutl.c
+++ b/src/usr.bin/openssl/pkeyutl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkeyutl.c,v 1.15 2019/02/17 15:01:08 inoguchi Exp $ */ 1/* $OpenBSD: pkeyutl.c,v 1.16 2019/07/14 03:30:46 guenther Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -96,7 +96,7 @@ static int do_keyop(EVP_PKEY_CTX * ctx, int pkey_op,
96 unsigned char *out, size_t * poutlen, 96 unsigned char *out, size_t * poutlen,
97 unsigned char *in, size_t inlen); 97 unsigned char *in, size_t inlen);
98 98
99struct option pkeyutl_options[] = { 99static const struct option pkeyutl_options[] = {
100 { 100 {
101 .name = "asn1parse", 101 .name = "asn1parse",
102 .desc = "ASN.1 parse the output data", 102 .desc = "ASN.1 parse the output data",
diff --git a/src/usr.bin/openssl/prime.c b/src/usr.bin/openssl/prime.c
index 5e1ad70ca0..ee0c342980 100644
--- a/src/usr.bin/openssl/prime.c
+++ b/src/usr.bin/openssl/prime.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: prime.c,v 1.12 2019/01/20 01:59:06 tb Exp $ */ 1/* $OpenBSD: prime.c,v 1.13 2019/07/14 03:30:46 guenther Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -64,7 +64,7 @@ struct {
64 int safe; 64 int safe;
65} prime_config; 65} prime_config;
66 66
67struct option prime_options[] = { 67static const struct option prime_options[] = {
68 { 68 {
69 .name = "bits", 69 .name = "bits",
70 .argname = "n", 70 .argname = "n",
diff --git a/src/usr.bin/openssl/rand.c b/src/usr.bin/openssl/rand.c
index 0f91dde8b4..fb639e3bc5 100644
--- a/src/usr.bin/openssl/rand.c
+++ b/src/usr.bin/openssl/rand.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand.c,v 1.13 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: rand.c,v 1.14 2019/07/14 03:30:46 guenther Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -68,7 +68,7 @@ struct {
68 char *outfile; 68 char *outfile;
69} rand_config; 69} rand_config;
70 70
71struct option rand_options[] = { 71static const struct option rand_options[] = {
72 { 72 {
73 .name = "base64", 73 .name = "base64",
74 .desc = "Perform base64 encoding on output", 74 .desc = "Perform base64 encoding on output",
diff --git a/src/usr.bin/openssl/rsa.c b/src/usr.bin/openssl/rsa.c
index 4017899c45..231674b5a6 100644
--- a/src/usr.bin/openssl/rsa.c
+++ b/src/usr.bin/openssl/rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.c,v 1.13 2019/02/09 15:49:21 inoguchi Exp $ */ 1/* $OpenBSD: rsa.c,v 1.14 2019/07/14 03:30:46 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -109,7 +109,7 @@ rsa_opt_cipher(int argc, char **argv, int *argsused)
109 return (0); 109 return (0);
110} 110}
111 111
112static struct option rsa_options[] = { 112static const struct option rsa_options[] = {
113 { 113 {
114 .name = "check", 114 .name = "check",
115 .desc = "Check consistency of RSA private key", 115 .desc = "Check consistency of RSA private key",
diff --git a/src/usr.bin/openssl/rsautl.c b/src/usr.bin/openssl/rsautl.c
index 7d7434c634..06d7a81ae0 100644
--- a/src/usr.bin/openssl/rsautl.c
+++ b/src/usr.bin/openssl/rsautl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsautl.c,v 1.17 2019/02/04 11:21:05 tb Exp $ */ 1/* $OpenBSD: rsautl.c,v 1.18 2019/07/14 03:30:46 guenther Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -89,7 +89,7 @@ struct {
89 int rsa_mode; 89 int rsa_mode;
90} rsautl_config; 90} rsautl_config;
91 91
92struct option rsautl_options[] = { 92static const struct option rsautl_options[] = {
93 { 93 {
94 .name = "asn1parse", 94 .name = "asn1parse",
95 .desc = "ASN.1 parse the output data", 95 .desc = "ASN.1 parse the output data",
diff --git a/src/usr.bin/openssl/s_time.c b/src/usr.bin/openssl/s_time.c
index 3263a2dff3..cdaac7e858 100644
--- a/src/usr.bin/openssl/s_time.c
+++ b/src/usr.bin/openssl/s_time.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s_time.c,v 1.33 2019/07/03 03:24:02 deraadt Exp $ */ 1/* $OpenBSD: s_time.c,v 1.34 2019/07/14 03:30:46 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -115,7 +115,7 @@ struct {
115 char *www_path; 115 char *www_path;
116} s_time_config; 116} s_time_config;
117 117
118struct option s_time_options[] = { 118static const struct option s_time_options[] = {
119 { 119 {
120 .name = "bugs", 120 .name = "bugs",
121 .desc = "Enable workarounds for known SSL/TLS bugs", 121 .desc = "Enable workarounds for known SSL/TLS bugs",
diff --git a/src/usr.bin/openssl/sess_id.c b/src/usr.bin/openssl/sess_id.c
index e739d99d94..d8a2bf272f 100644
--- a/src/usr.bin/openssl/sess_id.c
+++ b/src/usr.bin/openssl/sess_id.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sess_id.c,v 1.9 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: sess_id.c,v 1.10 2019/07/14 03:30:46 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -80,7 +80,7 @@ static struct {
80 int text; 80 int text;
81} sess_id_config; 81} sess_id_config;
82 82
83static struct option sess_id_options[] = { 83static const struct option sess_id_options[] = {
84 { 84 {
85 .name = "cert", 85 .name = "cert",
86 .desc = "Output certificate if present in session", 86 .desc = "Output certificate if present in session",
diff --git a/src/usr.bin/openssl/spkac.c b/src/usr.bin/openssl/spkac.c
index 549a220589..7fd8523c01 100644
--- a/src/usr.bin/openssl/spkac.c
+++ b/src/usr.bin/openssl/spkac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: spkac.c,v 1.10 2018/02/07 05:47:55 jsing Exp $ */ 1/* $OpenBSD: spkac.c,v 1.11 2019/07/14 03:30:46 guenther Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. Based on an original idea by Massimiliano Pala 3 * project 1999. Based on an original idea by Massimiliano Pala
4 * (madwolf@openca.org). 4 * (madwolf@openca.org).
@@ -86,7 +86,7 @@ static struct {
86 int verify; 86 int verify;
87} spkac_config; 87} spkac_config;
88 88
89static struct option spkac_options[] = { 89static const struct option spkac_options[] = {
90 { 90 {
91 .name = "challenge", 91 .name = "challenge",
92 .argname = "string", 92 .argname = "string",
diff --git a/src/usr.bin/openssl/version.c b/src/usr.bin/openssl/version.c
index 7e570044d2..374e0d0c4a 100644
--- a/src/usr.bin/openssl/version.c
+++ b/src/usr.bin/openssl/version.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: version.c,v 1.8 2015/10/17 15:00:11 doug Exp $ */ 1/* $OpenBSD: version.c,v 1.9 2019/07/14 03:30:46 guenther Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -157,7 +157,7 @@ version_all_opts(void)
157 return (0); 157 return (0);
158} 158}
159 159
160static struct option version_options[] = { 160static const struct option version_options[] = {
161 { 161 {
162 .name = "a", 162 .name = "a",
163 .desc = "All information (same as setting all other flags)", 163 .desc = "All information (same as setting all other flags)",