diff options
author | doug <> | 2015-10-17 15:00:11 +0000 |
---|---|---|
committer | doug <> | 2015-10-17 15:00:11 +0000 |
commit | 543f0f34095fd3775350a028db241378f1e4dd80 (patch) | |
tree | 9f56dde9b92f4c14124c4eab1e2457907ad59f71 | |
parent | 0713745868dc436c5b2e8e3b2b1951e7a897b163 (diff) | |
download | openbsd-543f0f34095fd3775350a028db241378f1e4dd80.tar.gz openbsd-543f0f34095fd3775350a028db241378f1e4dd80.tar.bz2 openbsd-543f0f34095fd3775350a028db241378f1e4dd80.zip |
Exit if a pledge call fails in non-interactive mode.
ok semarie@
45 files changed, 179 insertions, 89 deletions
diff --git a/src/usr.bin/openssl/asn1pars.c b/src/usr.bin/openssl/asn1pars.c index 2ce9d1a3ba..4fbae55861 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.5 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: asn1pars.c,v 1.6 2015/10/17 15:00:11 doug 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 | * |
@@ -248,8 +248,10 @@ asn1parse_main(int argc, char **argv) | |||
248 | ASN1_TYPE *at = NULL; | 248 | ASN1_TYPE *at = NULL; |
249 | 249 | ||
250 | if (single_execution) { | 250 | if (single_execution) { |
251 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 251 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
252 | perror("pledge"); | 252 | perror("pledge"); |
253 | exit(1); | ||
254 | } | ||
253 | } | 255 | } |
254 | 256 | ||
255 | memset(&asn1pars_config, 0, sizeof(asn1pars_config)); | 257 | memset(&asn1pars_config, 0, sizeof(asn1pars_config)); |
diff --git a/src/usr.bin/openssl/ca.c b/src/usr.bin/openssl/ca.c index d97410b556..8727d9c338 100644 --- a/src/usr.bin/openssl/ca.c +++ b/src/usr.bin/openssl/ca.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ca.c,v 1.18 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: ca.c,v 1.19 2015/10/17 15:00:11 doug 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 | * |
@@ -287,8 +287,10 @@ ca_main(int argc, char **argv) | |||
287 | DB_ATTR db_attr; | 287 | DB_ATTR db_attr; |
288 | 288 | ||
289 | if (single_execution) { | 289 | if (single_execution) { |
290 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 290 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
291 | perror("pledge"); | 291 | perror("pledge"); |
292 | exit(1); | ||
293 | } | ||
292 | } | 294 | } |
293 | 295 | ||
294 | conf = NULL; | 296 | conf = NULL; |
diff --git a/src/usr.bin/openssl/certhash.c b/src/usr.bin/openssl/certhash.c index bd0ac54ecf..70aa7b9931 100644 --- a/src/usr.bin/openssl/certhash.c +++ b/src/usr.bin/openssl/certhash.c | |||
@@ -650,8 +650,10 @@ certhash_main(int argc, char **argv) | |||
650 | int i, cwdfd, ret = 0; | 650 | int i, cwdfd, ret = 0; |
651 | 651 | ||
652 | if (single_execution) { | 652 | if (single_execution) { |
653 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 653 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
654 | perror("pledge"); | 654 | perror("pledge"); |
655 | exit(1); | ||
656 | } | ||
655 | } | 657 | } |
656 | 658 | ||
657 | memset(&certhash_config, 0, sizeof(certhash_config)); | 659 | memset(&certhash_config, 0, sizeof(certhash_config)); |
diff --git a/src/usr.bin/openssl/ciphers.c b/src/usr.bin/openssl/ciphers.c index caa40854ea..72e12a3aae 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.7 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: ciphers.c,v 1.8 2015/10/17 15:00:11 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -82,8 +82,10 @@ ciphers_main(int argc, char **argv) | |||
82 | char *desc; | 82 | char *desc; |
83 | 83 | ||
84 | if (single_execution) { | 84 | if (single_execution) { |
85 | if (pledge("stdio rpath", NULL) == -1) | 85 | if (pledge("stdio rpath", NULL) == -1) { |
86 | perror("pledge"); | 86 | perror("pledge"); |
87 | exit(1); | ||
88 | } | ||
87 | } | 89 | } |
88 | 90 | ||
89 | memset(&ciphers_config, 0, sizeof(ciphers_config)); | 91 | memset(&ciphers_config, 0, sizeof(ciphers_config)); |
diff --git a/src/usr.bin/openssl/cms.c b/src/usr.bin/openssl/cms.c index 4174960d7a..a1d8bc13ab 100644 --- a/src/usr.bin/openssl/cms.c +++ b/src/usr.bin/openssl/cms.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms.c,v 1.5 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: cms.c,v 1.6 2015/10/17 15:00:11 doug 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. | 3 | * project. |
4 | */ | 4 | */ |
@@ -136,8 +136,10 @@ cms_main(int argc, char **argv) | |||
136 | X509_VERIFY_PARAM *vpm = NULL; | 136 | X509_VERIFY_PARAM *vpm = NULL; |
137 | 137 | ||
138 | if (single_execution) { | 138 | if (single_execution) { |
139 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 139 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
140 | perror("pledge"); | 140 | perror("pledge"); |
141 | exit(1); | ||
142 | } | ||
141 | } | 143 | } |
142 | 144 | ||
143 | args = argv + 1; | 145 | args = argv + 1; |
diff --git a/src/usr.bin/openssl/crl.c b/src/usr.bin/openssl/crl.c index 47173ec5ed..9c9efa02a0 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.8 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: crl.c,v 1.9 2015/10/17 15:00:11 doug 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 | * |
@@ -231,8 +231,10 @@ crl_main(int argc, char **argv) | |||
231 | char *digest_name = NULL; | 231 | char *digest_name = NULL; |
232 | 232 | ||
233 | if (single_execution) { | 233 | if (single_execution) { |
234 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 234 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
235 | perror("pledge"); | 235 | perror("pledge"); |
236 | exit(1); | ||
237 | } | ||
236 | } | 238 | } |
237 | 239 | ||
238 | if (bio_out == NULL) { | 240 | if (bio_out == NULL) { |
diff --git a/src/usr.bin/openssl/crl2p7.c b/src/usr.bin/openssl/crl2p7.c index 3935bd18e0..5ce4e97c60 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.5 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: crl2p7.c,v 1.6 2015/10/17 15:00:11 doug 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 | * |
@@ -170,8 +170,10 @@ crl2pkcs7_main(int argc, char **argv) | |||
170 | int ret = 1; | 170 | int ret = 1; |
171 | 171 | ||
172 | if (single_execution) { | 172 | if (single_execution) { |
173 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 173 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
174 | perror("pledge"); | 174 | perror("pledge"); |
175 | exit(1); | ||
176 | } | ||
175 | } | 177 | } |
176 | 178 | ||
177 | memset(&crl2p7_config, 0, sizeof(crl2p7_config)); | 179 | memset(&crl2p7_config, 0, sizeof(crl2p7_config)); |
diff --git a/src/usr.bin/openssl/dgst.c b/src/usr.bin/openssl/dgst.c index 432f310030..a03409e212 100644 --- a/src/usr.bin/openssl/dgst.c +++ b/src/usr.bin/openssl/dgst.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dgst.c,v 1.8 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: dgst.c,v 1.9 2015/10/17 15:00:11 doug 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,8 +124,10 @@ dgst_main(int argc, char **argv) | |||
124 | STACK_OF(OPENSSL_STRING) * sigopts = NULL, *macopts = NULL; | 124 | STACK_OF(OPENSSL_STRING) * sigopts = NULL, *macopts = NULL; |
125 | 125 | ||
126 | if (single_execution) { | 126 | if (single_execution) { |
127 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 127 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
128 | perror("pledge"); | 128 | perror("pledge"); |
129 | exit(1); | ||
130 | } | ||
129 | } | 131 | } |
130 | 132 | ||
131 | if ((buf = malloc(BUFSIZE)) == NULL) { | 133 | if ((buf = malloc(BUFSIZE)) == NULL) { |
diff --git a/src/usr.bin/openssl/dh.c b/src/usr.bin/openssl/dh.c index 7e8d65d1f6..e3d8eca5f9 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.7 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: dh.c,v 1.8 2015/10/17 15:00:11 doug 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 | * |
@@ -159,8 +159,10 @@ dh_main(int argc, char **argv) | |||
159 | int ret = 1; | 159 | int ret = 1; |
160 | 160 | ||
161 | if (single_execution) { | 161 | if (single_execution) { |
162 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 162 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
163 | perror("pledge"); | 163 | perror("pledge"); |
164 | exit(1); | ||
165 | } | ||
164 | } | 166 | } |
165 | 167 | ||
166 | memset(&dh_config, 0, sizeof(dh_config)); | 168 | memset(&dh_config, 0, sizeof(dh_config)); |
diff --git a/src/usr.bin/openssl/dhparam.c b/src/usr.bin/openssl/dhparam.c index 55b75663b3..1f8bdaed2a 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.7 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: dhparam.c,v 1.8 2015/10/17 15:00:11 doug 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 | * |
@@ -244,8 +244,10 @@ dhparam_main(int argc, char **argv) | |||
244 | int i; | 244 | int i; |
245 | 245 | ||
246 | if (single_execution) { | 246 | if (single_execution) { |
247 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 247 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
248 | perror("pledge"); | 248 | perror("pledge"); |
249 | exit(1); | ||
250 | } | ||
249 | } | 251 | } |
250 | 252 | ||
251 | memset(&dhparam_config, 0, sizeof(dhparam_config)); | 253 | memset(&dhparam_config, 0, sizeof(dhparam_config)); |
diff --git a/src/usr.bin/openssl/dsa.c b/src/usr.bin/openssl/dsa.c index 6a774ee545..3ca174a1e9 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.7 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: dsa.c,v 1.8 2015/10/17 15:00:11 doug 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 | * |
@@ -241,8 +241,10 @@ dsa_main(int argc, char **argv) | |||
241 | char *passin = NULL, *passout = NULL; | 241 | char *passin = NULL, *passout = NULL; |
242 | 242 | ||
243 | if (single_execution) { | 243 | if (single_execution) { |
244 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 244 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
245 | perror("pledge"); | 245 | perror("pledge"); |
246 | exit(1); | ||
247 | } | ||
246 | } | 248 | } |
247 | 249 | ||
248 | memset(&dsa_config, 0, sizeof(dsa_config)); | 250 | memset(&dsa_config, 0, sizeof(dsa_config)); |
diff --git a/src/usr.bin/openssl/dsaparam.c b/src/usr.bin/openssl/dsaparam.c index 73249498fc..37b9a68693 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.6 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: dsaparam.c,v 1.7 2015/10/17 15:00:11 doug 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 | * |
@@ -169,8 +169,10 @@ dsaparam_main(int argc, char **argv) | |||
169 | char *strbits = NULL; | 169 | char *strbits = NULL; |
170 | 170 | ||
171 | if (single_execution) { | 171 | if (single_execution) { |
172 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 172 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
173 | perror("pledge"); | 173 | perror("pledge"); |
174 | exit(1); | ||
175 | } | ||
174 | } | 176 | } |
175 | 177 | ||
176 | memset(&dsaparam_config, 0, sizeof(dsaparam_config)); | 178 | memset(&dsaparam_config, 0, sizeof(dsaparam_config)); |
diff --git a/src/usr.bin/openssl/ec.c b/src/usr.bin/openssl/ec.c index b376d43404..fe58e1357d 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.7 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: ec.c,v 1.8 2015/10/17 15:00:11 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -278,8 +278,10 @@ ec_main(int argc, char **argv) | |||
278 | char *passin = NULL, *passout = NULL; | 278 | char *passin = NULL, *passout = NULL; |
279 | 279 | ||
280 | if (single_execution) { | 280 | if (single_execution) { |
281 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 281 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
282 | perror("pledge"); | 282 | perror("pledge"); |
283 | exit(1); | ||
284 | } | ||
283 | } | 285 | } |
284 | 286 | ||
285 | memset(&ec_config, 0, sizeof(ec_config)); | 287 | memset(&ec_config, 0, sizeof(ec_config)); |
diff --git a/src/usr.bin/openssl/ecparam.c b/src/usr.bin/openssl/ecparam.c index bd0c5b8cc0..a4a400f88a 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.14 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: ecparam.c,v 1.15 2015/10/17 15:00:11 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -260,8 +260,10 @@ ecparam_main(int argc, char **argv) | |||
260 | int i, ret = 1; | 260 | int i, ret = 1; |
261 | 261 | ||
262 | if (single_execution) { | 262 | if (single_execution) { |
263 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 263 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
264 | perror("pledge"); | 264 | perror("pledge"); |
265 | exit(1); | ||
266 | } | ||
265 | } | 267 | } |
266 | 268 | ||
267 | memset(&ecparam_config, 0, sizeof(ecparam_config)); | 269 | memset(&ecparam_config, 0, sizeof(ecparam_config)); |
diff --git a/src/usr.bin/openssl/enc.c b/src/usr.bin/openssl/enc.c index 296024c68f..8dcaf0bd7c 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.9 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: enc.c,v 1.10 2015/10/17 15:00:11 doug 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 | * |
@@ -339,8 +339,10 @@ enc_main(int argc, char **argv) | |||
339 | int i; | 339 | int i; |
340 | 340 | ||
341 | if (single_execution) { | 341 | if (single_execution) { |
342 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 342 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
343 | perror("pledge"); | 343 | perror("pledge"); |
344 | exit(1); | ||
345 | } | ||
344 | } | 346 | } |
345 | 347 | ||
346 | memset(&enc_config, 0, sizeof(enc_config)); | 348 | memset(&enc_config, 0, sizeof(enc_config)); |
diff --git a/src/usr.bin/openssl/errstr.c b/src/usr.bin/openssl/errstr.c index 7bd97d99b0..0d31d4fc85 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.5 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: errstr.c,v 1.6 2015/10/17 15:00:11 doug 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 | * |
@@ -99,8 +99,10 @@ errstr_main(int argc, char **argv) | |||
99 | int ret = 0; | 99 | int ret = 0; |
100 | 100 | ||
101 | if (single_execution) { | 101 | if (single_execution) { |
102 | if (pledge("stdio rpath", NULL) == -1) | 102 | if (pledge("stdio rpath", NULL) == -1) { |
103 | perror("pledge"); | 103 | perror("pledge"); |
104 | exit(1); | ||
105 | } | ||
104 | } | 106 | } |
105 | 107 | ||
106 | memset(&errstr_config, 0, sizeof(errstr_config)); | 108 | memset(&errstr_config, 0, sizeof(errstr_config)); |
diff --git a/src/usr.bin/openssl/gendh.c b/src/usr.bin/openssl/gendh.c index ceea237be1..235fbdee38 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.6 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: gendh.c,v 1.7 2015/10/17 15:00:11 doug 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 | * |
@@ -135,8 +135,10 @@ gendh_main(int argc, char **argv) | |||
135 | char *strbits = NULL; | 135 | char *strbits = NULL; |
136 | 136 | ||
137 | if (single_execution) { | 137 | if (single_execution) { |
138 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 138 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
139 | perror("pledge"); | 139 | perror("pledge"); |
140 | exit(1); | ||
141 | } | ||
140 | } | 142 | } |
141 | 143 | ||
142 | BN_GENCB_set(&cb, dh_cb, bio_err); | 144 | BN_GENCB_set(&cb, dh_cb, bio_err); |
diff --git a/src/usr.bin/openssl/gendsa.c b/src/usr.bin/openssl/gendsa.c index 3e027aaf26..c73aa34399 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.6 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: gendsa.c,v 1.7 2015/10/17 15:00:11 doug 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 | * |
@@ -86,8 +86,10 @@ gendsa_main(int argc, char **argv) | |||
86 | const EVP_CIPHER *enc = NULL; | 86 | const EVP_CIPHER *enc = NULL; |
87 | 87 | ||
88 | if (single_execution) { | 88 | if (single_execution) { |
89 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 89 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
90 | perror("pledge"); | 90 | perror("pledge"); |
91 | exit(1); | ||
92 | } | ||
91 | } | 93 | } |
92 | 94 | ||
93 | argv++; | 95 | argv++; |
diff --git a/src/usr.bin/openssl/genpkey.c b/src/usr.bin/openssl/genpkey.c index 995d66f14d..174ca5e4ba 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.7 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: genpkey.c,v 1.8 2015/10/17 15:00:11 doug 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 | */ |
@@ -87,8 +87,10 @@ genpkey_main(int argc, char **argv) | |||
87 | int do_param = 0; | 87 | int do_param = 0; |
88 | 88 | ||
89 | if (single_execution) { | 89 | if (single_execution) { |
90 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 90 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
91 | perror("pledge"); | 91 | perror("pledge"); |
92 | exit(1); | ||
93 | } | ||
92 | } | 94 | } |
93 | 95 | ||
94 | outformat = FORMAT_PEM; | 96 | outformat = FORMAT_PEM; |
diff --git a/src/usr.bin/openssl/genrsa.c b/src/usr.bin/openssl/genrsa.c index 35e6d602b0..951da4c7a7 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.7 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: genrsa.c,v 1.8 2015/10/17 15:00:11 doug 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 | * |
@@ -101,8 +101,10 @@ genrsa_main(int argc, char **argv) | |||
101 | RSA *rsa = NULL; | 101 | RSA *rsa = NULL; |
102 | 102 | ||
103 | if (single_execution) { | 103 | if (single_execution) { |
104 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 104 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
105 | perror("pledge"); | 105 | perror("pledge"); |
106 | exit(1); | ||
107 | } | ||
106 | } | 108 | } |
107 | 109 | ||
108 | if (!bn) | 110 | if (!bn) |
diff --git a/src/usr.bin/openssl/nseq.c b/src/usr.bin/openssl/nseq.c index 15df3ffd40..be64668da0 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.5 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: nseq.c,v 1.6 2015/10/17 15:00:11 doug 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 | */ |
@@ -110,8 +110,10 @@ nseq_main(int argc, char **argv) | |||
110 | int i, ret = 1; | 110 | int i, ret = 1; |
111 | 111 | ||
112 | if (single_execution) { | 112 | if (single_execution) { |
113 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 113 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
114 | perror("pledge"); | 114 | perror("pledge"); |
115 | exit(1); | ||
116 | } | ||
115 | } | 117 | } |
116 | 118 | ||
117 | memset(&nseq_config, 0, sizeof(nseq_config)); | 119 | memset(&nseq_config, 0, sizeof(nseq_config)); |
diff --git a/src/usr.bin/openssl/ocsp.c b/src/usr.bin/openssl/ocsp.c index c3b1b168ba..70dddb4f09 100644 --- a/src/usr.bin/openssl/ocsp.c +++ b/src/usr.bin/openssl/ocsp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp.c,v 1.6 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: ocsp.c,v 1.7 2015/10/17 15:00:11 doug 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 | */ |
@@ -147,8 +147,10 @@ ocsp_main(int argc, char **argv) | |||
147 | const char *errstr = NULL; | 147 | const char *errstr = NULL; |
148 | 148 | ||
149 | if (single_execution) { | 149 | if (single_execution) { |
150 | if (pledge("stdio inet rpath wpath cpath", NULL) == -1) | 150 | if (pledge("stdio inet rpath wpath cpath", NULL) == -1) { |
151 | perror("pledge"); | 151 | perror("pledge"); |
152 | exit(1); | ||
153 | } | ||
152 | } | 154 | } |
153 | 155 | ||
154 | args = argv + 1; | 156 | args = argv + 1; |
diff --git a/src/usr.bin/openssl/passwd.c b/src/usr.bin/openssl/passwd.c index 7ef7ef456c..04da52ee68 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.6 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: passwd.c,v 1.7 2015/10/17 15:00:11 doug 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 |
@@ -146,8 +146,10 @@ passwd_main(int argc, char **argv) | |||
146 | int ret = 1; | 146 | int ret = 1; |
147 | 147 | ||
148 | if (single_execution) { | 148 | if (single_execution) { |
149 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 149 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
150 | perror("pledge"); | 150 | perror("pledge"); |
151 | exit(1); | ||
152 | } | ||
151 | } | 153 | } |
152 | 154 | ||
153 | memset(&passwd_config, 0, sizeof(passwd_config)); | 155 | memset(&passwd_config, 0, sizeof(passwd_config)); |
diff --git a/src/usr.bin/openssl/pkcs12.c b/src/usr.bin/openssl/pkcs12.c index 2eb04a58b7..0cd1ed7893 100644 --- a/src/usr.bin/openssl/pkcs12.c +++ b/src/usr.bin/openssl/pkcs12.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pkcs12.c,v 1.6 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: pkcs12.c,v 1.7 2015/10/17 15:00:11 doug 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. | 3 | * project. |
4 | */ | 4 | */ |
@@ -125,8 +125,10 @@ pkcs12_main(int argc, char **argv) | |||
125 | char *CApath = NULL, *CAfile = NULL; | 125 | char *CApath = NULL, *CAfile = NULL; |
126 | 126 | ||
127 | if (single_execution) { | 127 | if (single_execution) { |
128 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 128 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
129 | perror("pledge"); | 129 | perror("pledge"); |
130 | exit(1); | ||
131 | } | ||
130 | } | 132 | } |
131 | 133 | ||
132 | cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; | 134 | cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; |
diff --git a/src/usr.bin/openssl/pkcs7.c b/src/usr.bin/openssl/pkcs7.c index c29a9c8df2..382a8bfa2c 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.7 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: pkcs7.c,v 1.8 2015/10/17 15:00:11 doug 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 | * |
@@ -155,8 +155,10 @@ pkcs7_main(int argc, char **argv) | |||
155 | int i; | 155 | int i; |
156 | 156 | ||
157 | if (single_execution) { | 157 | if (single_execution) { |
158 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 158 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
159 | perror("pledge"); | 159 | perror("pledge"); |
160 | exit(1); | ||
161 | } | ||
160 | } | 162 | } |
161 | 163 | ||
162 | memset(&pkcs7_config, 0, sizeof(pkcs7_config)); | 164 | memset(&pkcs7_config, 0, sizeof(pkcs7_config)); |
diff --git a/src/usr.bin/openssl/pkcs8.c b/src/usr.bin/openssl/pkcs8.c index 5b54cbfb98..9c620c8619 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.8 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: pkcs8.c,v 1.9 2015/10/17 15:00:11 doug 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 | */ |
@@ -227,8 +227,10 @@ pkcs8_main(int argc, char **argv) | |||
227 | int ret = 1; | 227 | int ret = 1; |
228 | 228 | ||
229 | if (single_execution) { | 229 | if (single_execution) { |
230 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 230 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
231 | perror("pledge"); | 231 | perror("pledge"); |
232 | exit(1); | ||
233 | } | ||
232 | } | 234 | } |
233 | 235 | ||
234 | memset(&pkcs8_config, 0, sizeof(pkcs8_config)); | 236 | memset(&pkcs8_config, 0, sizeof(pkcs8_config)); |
diff --git a/src/usr.bin/openssl/pkey.c b/src/usr.bin/openssl/pkey.c index 0a0590ccb6..9c38d0ee3c 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.7 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: pkey.c,v 1.8 2015/10/17 15:00:11 doug 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 | */ |
@@ -80,8 +80,10 @@ pkey_main(int argc, char **argv) | |||
80 | int ret = 1; | 80 | int ret = 1; |
81 | 81 | ||
82 | if (single_execution) { | 82 | if (single_execution) { |
83 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 83 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
84 | perror("pledge"); | 84 | perror("pledge"); |
85 | exit(1); | ||
86 | } | ||
85 | } | 87 | } |
86 | 88 | ||
87 | informat = FORMAT_PEM; | 89 | informat = FORMAT_PEM; |
diff --git a/src/usr.bin/openssl/pkeyparam.c b/src/usr.bin/openssl/pkeyparam.c index cb40fbb3ed..a8a40d2b4f 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.8 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: pkeyparam.c,v 1.9 2015/10/17 15:00:11 doug 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 | */ |
@@ -119,8 +119,10 @@ pkeyparam_main(int argc, char **argv) | |||
119 | int ret = 1; | 119 | int ret = 1; |
120 | 120 | ||
121 | if (single_execution) { | 121 | if (single_execution) { |
122 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 122 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
123 | perror("pledge"); | 123 | perror("pledge"); |
124 | exit(1); | ||
125 | } | ||
124 | } | 126 | } |
125 | 127 | ||
126 | memset(&pkeyparam_config, 0, sizeof(pkeyparam_config)); | 128 | memset(&pkeyparam_config, 0, sizeof(pkeyparam_config)); |
diff --git a/src/usr.bin/openssl/pkeyutl.c b/src/usr.bin/openssl/pkeyutl.c index bf3fcf1b92..4bfb5420f9 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.9 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: pkeyutl.c,v 1.10 2015/10/17 15:00:11 doug 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 | */ |
@@ -101,8 +101,10 @@ pkeyutl_main(int argc, char **argv) | |||
101 | int ret = 1, rv = -1; | 101 | int ret = 1, rv = -1; |
102 | 102 | ||
103 | if (single_execution) { | 103 | if (single_execution) { |
104 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 104 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
105 | perror("pledge"); | 105 | perror("pledge"); |
106 | exit(1); | ||
107 | } | ||
106 | } | 108 | } |
107 | 109 | ||
108 | argc--; | 110 | argc--; |
diff --git a/src/usr.bin/openssl/prime.c b/src/usr.bin/openssl/prime.c index 13398b01b0..c9bf33bff9 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.9 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: prime.c,v 1.10 2015/10/17 15:00:11 doug 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 | * |
@@ -119,8 +119,10 @@ prime_main(int argc, char **argv) | |||
119 | int ret = 1; | 119 | int ret = 1; |
120 | 120 | ||
121 | if (single_execution) { | 121 | if (single_execution) { |
122 | if (pledge("stdio rpath", NULL) == -1) | 122 | if (pledge("stdio rpath", NULL) == -1) { |
123 | perror("pledge"); | 123 | perror("pledge"); |
124 | exit(1); | ||
125 | } | ||
124 | } | 126 | } |
125 | 127 | ||
126 | memset(&prime_config, 0, sizeof(prime_config)); | 128 | memset(&prime_config, 0, sizeof(prime_config)); |
diff --git a/src/usr.bin/openssl/rand.c b/src/usr.bin/openssl/rand.c index 2377c6e72b..5f21bbc11c 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.9 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: rand.c,v 1.10 2015/10/17 15:00:11 doug 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 | * |
@@ -110,8 +110,10 @@ rand_main(int argc, char **argv) | |||
110 | BIO *out = NULL; | 110 | BIO *out = NULL; |
111 | 111 | ||
112 | if (single_execution) { | 112 | if (single_execution) { |
113 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 113 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
114 | perror("pledge"); | 114 | perror("pledge"); |
115 | exit(1); | ||
116 | } | ||
115 | } | 117 | } |
116 | 118 | ||
117 | memset(&rand_config, 0, sizeof(rand_config)); | 119 | memset(&rand_config, 0, sizeof(rand_config)); |
diff --git a/src/usr.bin/openssl/req.c b/src/usr.bin/openssl/req.c index c2f20ae757..3a52f58831 100644 --- a/src/usr.bin/openssl/req.c +++ b/src/usr.bin/openssl/req.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: req.c,v 1.11 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: req.c,v 1.12 2015/10/17 15:00:11 doug 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 | * |
@@ -177,8 +177,10 @@ req_main(int argc, char **argv) | |||
177 | unsigned long chtype = MBSTRING_ASC; | 177 | unsigned long chtype = MBSTRING_ASC; |
178 | 178 | ||
179 | if (single_execution) { | 179 | if (single_execution) { |
180 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 180 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
181 | perror("pledge"); | 181 | perror("pledge"); |
182 | exit(1); | ||
183 | } | ||
182 | } | 184 | } |
183 | 185 | ||
184 | req_conf = NULL; | 186 | req_conf = NULL; |
diff --git a/src/usr.bin/openssl/rsa.c b/src/usr.bin/openssl/rsa.c index 06d3ca1b42..54482ab9f0 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.7 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: rsa.c,v 1.8 2015/10/17 15:00:11 doug 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 | * |
@@ -269,8 +269,10 @@ rsa_main(int argc, char **argv) | |||
269 | char *passin = NULL, *passout = NULL; | 269 | char *passin = NULL, *passout = NULL; |
270 | 270 | ||
271 | if (single_execution) { | 271 | if (single_execution) { |
272 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 272 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
273 | perror("pledge"); | 273 | perror("pledge"); |
274 | exit(1); | ||
275 | } | ||
274 | } | 276 | } |
275 | 277 | ||
276 | memset(&rsa_config, 0, sizeof(rsa_config)); | 278 | memset(&rsa_config, 0, sizeof(rsa_config)); |
diff --git a/src/usr.bin/openssl/rsautl.c b/src/usr.bin/openssl/rsautl.c index a6106e0313..3a5290845a 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.9 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: rsautl.c,v 1.10 2015/10/17 15:00:11 doug 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 | */ |
@@ -99,8 +99,10 @@ rsautl_main(int argc, char **argv) | |||
99 | int ret = 1; | 99 | int ret = 1; |
100 | 100 | ||
101 | if (single_execution) { | 101 | if (single_execution) { |
102 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 102 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
103 | perror("pledge"); | 103 | perror("pledge"); |
104 | exit(1); | ||
105 | } | ||
104 | } | 106 | } |
105 | 107 | ||
106 | argc--; | 108 | argc--; |
diff --git a/src/usr.bin/openssl/s_client.c b/src/usr.bin/openssl/s_client.c index 6bc66ac5fb..ed7ecfa714 100644 --- a/src/usr.bin/openssl/s_client.c +++ b/src/usr.bin/openssl/s_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_client.c,v 1.22 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: s_client.c,v 1.23 2015/10/17 15:00:11 doug 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 | * |
@@ -365,8 +365,10 @@ s_client_main(int argc, char **argv) | |||
365 | long socket_mtu = 0; | 365 | long socket_mtu = 0; |
366 | 366 | ||
367 | if (single_execution) { | 367 | if (single_execution) { |
368 | if (pledge("stdio inet rpath wpath cpath tty", NULL) == -1) | 368 | if (pledge("stdio inet rpath wpath cpath tty", NULL) == -1) { |
369 | perror("pledge"); | 369 | perror("pledge"); |
370 | exit(1); | ||
371 | } | ||
370 | } | 372 | } |
371 | 373 | ||
372 | meth = SSLv23_client_method(); | 374 | meth = SSLv23_client_method(); |
diff --git a/src/usr.bin/openssl/s_server.c b/src/usr.bin/openssl/s_server.c index 33765eeedb..a2dd1f0b75 100644 --- a/src/usr.bin/openssl/s_server.c +++ b/src/usr.bin/openssl/s_server.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_server.c,v 1.21 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: s_server.c,v 1.22 2015/10/17 15:00:11 doug 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 | * |
@@ -605,8 +605,10 @@ s_server_main(int argc, char *argv[]) | |||
605 | tlsextalpnctx alpn_ctx = { NULL, 0 }; | 605 | tlsextalpnctx alpn_ctx = { NULL, 0 }; |
606 | 606 | ||
607 | if (single_execution) { | 607 | if (single_execution) { |
608 | if (pledge("stdio inet rpath tty", NULL) == -1) | 608 | if (pledge("stdio inet rpath tty", NULL) == -1) { |
609 | perror("pledge"); | 609 | perror("pledge"); |
610 | exit(1); | ||
611 | } | ||
610 | } | 612 | } |
611 | 613 | ||
612 | meth = SSLv23_server_method(); | 614 | meth = SSLv23_server_method(); |
diff --git a/src/usr.bin/openssl/s_time.c b/src/usr.bin/openssl/s_time.c index 417ff81f3f..8e6788d76d 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.13 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: s_time.c,v 1.14 2015/10/17 15:00:11 doug 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 | * |
@@ -259,8 +259,10 @@ s_time_main(int argc, char **argv) | |||
259 | int ver; | 259 | int ver; |
260 | 260 | ||
261 | if (single_execution) { | 261 | if (single_execution) { |
262 | if (pledge("stdio inet rpath", NULL) == -1) | 262 | if (pledge("stdio inet rpath", NULL) == -1) { |
263 | perror("pledge"); | 263 | perror("pledge"); |
264 | exit(1); | ||
265 | } | ||
264 | } | 266 | } |
265 | 267 | ||
266 | s_time_meth = SSLv23_client_method(); | 268 | s_time_meth = SSLv23_client_method(); |
diff --git a/src/usr.bin/openssl/sess_id.c b/src/usr.bin/openssl/sess_id.c index 7bf14adbea..d0f367d4b7 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.6 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: sess_id.c,v 1.7 2015/10/17 15:00:11 doug 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 | * |
@@ -159,8 +159,10 @@ sess_id_main(int argc, char **argv) | |||
159 | BIO *out = NULL; | 159 | BIO *out = NULL; |
160 | 160 | ||
161 | if (single_execution) { | 161 | if (single_execution) { |
162 | if (pledge("stdio rpath wpath cpath", NULL) == -1) | 162 | if (pledge("stdio rpath wpath cpath", NULL) == -1) { |
163 | perror("pledge"); | 163 | perror("pledge"); |
164 | exit(1); | ||
165 | } | ||
164 | } | 166 | } |
165 | 167 | ||
166 | memset(&sess_id_config, 0, sizeof(sess_id_config)); | 168 | memset(&sess_id_config, 0, sizeof(sess_id_config)); |
diff --git a/src/usr.bin/openssl/smime.c b/src/usr.bin/openssl/smime.c index 53e2a94a54..92027ba99a 100644 --- a/src/usr.bin/openssl/smime.c +++ b/src/usr.bin/openssl/smime.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: smime.c,v 1.6 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: smime.c,v 1.7 2015/10/17 15:00:11 doug 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. | 3 | * project. |
4 | */ | 4 | */ |
@@ -113,8 +113,10 @@ smime_main(int argc, char **argv) | |||
113 | X509_VERIFY_PARAM *vpm = NULL; | 113 | X509_VERIFY_PARAM *vpm = NULL; |
114 | 114 | ||
115 | if (single_execution) { | 115 | if (single_execution) { |
116 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 116 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
117 | perror("pledge"); | 117 | perror("pledge"); |
118 | exit(1); | ||
119 | } | ||
118 | } | 120 | } |
119 | 121 | ||
120 | args = argv + 1; | 122 | args = argv + 1; |
diff --git a/src/usr.bin/openssl/speed.c b/src/usr.bin/openssl/speed.c index cc555afe8c..52ab5c6db3 100644 --- a/src/usr.bin/openssl/speed.c +++ b/src/usr.bin/openssl/speed.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: speed.c,v 1.17 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: speed.c,v 1.18 2015/10/17 15:00:11 doug 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 | * |
@@ -470,8 +470,10 @@ speed_main(int argc, char **argv) | |||
470 | const char *errstr = NULL; | 470 | const char *errstr = NULL; |
471 | 471 | ||
472 | if (single_execution) { | 472 | if (single_execution) { |
473 | if (pledge("stdio proc", NULL) == -1) | 473 | if (pledge("stdio proc", NULL) == -1) { |
474 | perror("pledge"); | 474 | perror("pledge"); |
475 | exit(1); | ||
476 | } | ||
475 | } | 477 | } |
476 | 478 | ||
477 | usertime = -1; | 479 | usertime = -1; |
diff --git a/src/usr.bin/openssl/spkac.c b/src/usr.bin/openssl/spkac.c index 7eff70b5e6..426ea13431 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.7 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: spkac.c,v 1.8 2015/10/17 15:00:11 doug 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). |
@@ -182,8 +182,10 @@ spkac_main(int argc, char **argv) | |||
182 | EVP_PKEY *pkey = NULL; | 182 | EVP_PKEY *pkey = NULL; |
183 | 183 | ||
184 | if (single_execution) { | 184 | if (single_execution) { |
185 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 185 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
186 | perror("pledge"); | 186 | perror("pledge"); |
187 | exit(1); | ||
188 | } | ||
187 | } | 189 | } |
188 | 190 | ||
189 | memset(&spkac_config, 0, sizeof(spkac_config)); | 191 | memset(&spkac_config, 0, sizeof(spkac_config)); |
diff --git a/src/usr.bin/openssl/ts.c b/src/usr.bin/openssl/ts.c index 60b8f02bac..781ab33368 100644 --- a/src/usr.bin/openssl/ts.c +++ b/src/usr.bin/openssl/ts.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ts.c,v 1.12 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: ts.c,v 1.13 2015/10/17 15:00:11 doug Exp $ */ |
2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL | 2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL |
3 | * project 2002. | 3 | * project 2002. |
4 | */ | 4 | */ |
@@ -150,8 +150,10 @@ ts_main(int argc, char **argv) | |||
150 | int token_out = 0; | 150 | int token_out = 0; |
151 | 151 | ||
152 | if (single_execution) { | 152 | if (single_execution) { |
153 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 153 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
154 | perror("pledge"); | 154 | perror("pledge"); |
155 | exit(1); | ||
156 | } | ||
155 | } | 157 | } |
156 | 158 | ||
157 | for (argc--, argv++; argc > 0; argc--, argv++) { | 159 | for (argc--, argv++; argc > 0; argc--, argv++) { |
diff --git a/src/usr.bin/openssl/verify.c b/src/usr.bin/openssl/verify.c index 4975ad5b6e..d9b5ef9795 100644 --- a/src/usr.bin/openssl/verify.c +++ b/src/usr.bin/openssl/verify.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: verify.c,v 1.5 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: verify.c,v 1.6 2015/10/17 15:00:11 doug 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 | * |
@@ -86,8 +86,10 @@ verify_main(int argc, char **argv) | |||
86 | X509_VERIFY_PARAM *vpm = NULL; | 86 | X509_VERIFY_PARAM *vpm = NULL; |
87 | 87 | ||
88 | if (single_execution) { | 88 | if (single_execution) { |
89 | if (pledge("stdio rpath", NULL) == -1) | 89 | if (pledge("stdio rpath", NULL) == -1) { |
90 | perror("pledge"); | 90 | perror("pledge"); |
91 | exit(1); | ||
92 | } | ||
91 | } | 93 | } |
92 | 94 | ||
93 | cert_ctx = X509_STORE_new(); | 95 | cert_ctx = X509_STORE_new(); |
diff --git a/src/usr.bin/openssl/version.c b/src/usr.bin/openssl/version.c index e096f89969..7e570044d2 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.7 2015/10/10 22:28:51 doug Exp $ */ | 1 | /* $OpenBSD: version.c,v 1.8 2015/10/17 15:00:11 doug 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 | * |
@@ -214,8 +214,10 @@ int | |||
214 | version_main(int argc, char **argv) | 214 | version_main(int argc, char **argv) |
215 | { | 215 | { |
216 | if (single_execution) { | 216 | if (single_execution) { |
217 | if (pledge("stdio", NULL) == -1) | 217 | if (pledge("stdio", NULL) == -1) { |
218 | perror("pledge"); | 218 | perror("pledge"); |
219 | exit(1); | ||
220 | } | ||
219 | } | 221 | } |
220 | 222 | ||
221 | memset(&version_config, 0, sizeof(version_config)); | 223 | memset(&version_config, 0, sizeof(version_config)); |
diff --git a/src/usr.bin/openssl/x509.c b/src/usr.bin/openssl/x509.c index 08b39e5db6..da5f2c37ea 100644 --- a/src/usr.bin/openssl/x509.c +++ b/src/usr.bin/openssl/x509.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.c,v 1.11 2015/10/17 07:51:10 semarie Exp $ */ | 1 | /* $OpenBSD: x509.c,v 1.12 2015/10/17 15:00:11 doug 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 | * |
@@ -199,8 +199,10 @@ x509_main(int argc, char **argv) | |||
199 | const char *errstr = NULL; | 199 | const char *errstr = NULL; |
200 | 200 | ||
201 | if (single_execution) { | 201 | if (single_execution) { |
202 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) | 202 | if (pledge("stdio rpath wpath cpath tty", NULL) == -1) { |
203 | perror("pledge"); | 203 | perror("pledge"); |
204 | exit(1); | ||
205 | } | ||
204 | } | 206 | } |
205 | 207 | ||
206 | reqfile = 0; | 208 | reqfile = 0; |