-/* $OpenBSD: asn1pars.c,v 1.11 2022/01/12 22:55:51 tb Exp $ */
+/* $OpenBSD: asn1pars.c,v 1.12 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BUF_MEM *buf = NULL;
ASN1_TYPE *at = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&asn1pars_config, 0, sizeof(asn1pars_config));
-/* $OpenBSD: ca.c,v 1.53 2022/02/03 17:44:04 tb Exp $ */
+/* $OpenBSD: ca.c,v 1.54 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
char *tofree = NULL;
DB_ATTR db_attr;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&ca_config, 0, sizeof(ca_config));
-/* $OpenBSD: certhash.c,v 1.19 2021/10/23 08:13:48 tb Exp $ */
+/* $OpenBSD: certhash.c,v 1.20 2022/11/11 17:07:38 joshua Exp $ */
/*
* Copyright (c) 2014, 2015 Joel Sing <jsing@openbsd.org>
*
int argsused;
int i, cwdfd, ret = 0;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&certhash_config, 0, sizeof(certhash_config));
-/* $OpenBSD: ciphers.c,v 1.15 2022/07/19 20:15:19 tb Exp $ */
+/* $OpenBSD: ciphers.c,v 1.16 2022/11/11 17:07:38 joshua Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
int i, rv = 0;
char *desc;
- if (single_execution) {
- if (pledge("stdio rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&ciphers_config, 0, sizeof(ciphers_config));
-/* $OpenBSD: cms.c,v 1.30 2022/03/23 15:16:59 tb Exp $ */
+/* $OpenBSD: cms.c,v 1.31 2022/11/11 17:07:38 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
char *passin = NULL;
unsigned char *pwri_tmp = NULL;
- if (single_execution) {
- if (pledge("stdio rpath wpath cpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio rpath wpath cpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&cms_config, 0, sizeof(cms_config));
-/* $OpenBSD: crl.c,v 1.15 2021/10/31 16:47:27 tb Exp $ */
+/* $OpenBSD: crl.c,v 1.16 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
const EVP_MD *digest;
char *digest_name = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
if (bio_out == NULL) {
-/* $OpenBSD: crl2p7.c,v 1.9 2019/07/14 03:30:45 guenther Exp $ */
+/* $OpenBSD: crl2p7.c,v 1.10 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
STACK_OF(X509) *cert_stack = NULL;
int ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&crl2p7_config, 0, sizeof(crl2p7_config));
-/* $OpenBSD: dgst.c,v 1.19 2022/01/14 09:28:07 tb Exp $ */
+/* $OpenBSD: dgst.c,v 1.20 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int siglen = 0;
char *passin = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
if ((buf = malloc(BUFSIZE)) == NULL) {
-/* $OpenBSD: dh.c,v 1.13 2022/01/14 09:21:54 tb Exp $ */
+/* $OpenBSD: dh.c,v 1.14 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BIO *in = NULL, *out = NULL;
int ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&dh_config, 0, sizeof(dh_config));
-/* $OpenBSD: dhparam.c,v 1.14 2022/01/14 09:22:50 tb Exp $ */
+/* $OpenBSD: dhparam.c,v 1.15 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int ret = 1;
int i;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&dhparam_config, 0, sizeof(dhparam_config));
-/* $OpenBSD: dsa.c,v 1.16 2022/01/14 09:23:42 tb Exp $ */
+/* $OpenBSD: dsa.c,v 1.17 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BIO *in = NULL, *out = NULL;
char *passin = NULL, *passout = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&dsa_config, 0, sizeof(dsa_config));
-/* $OpenBSD: dsaparam.c,v 1.13 2022/01/14 09:24:20 tb Exp $ */
+/* $OpenBSD: dsaparam.c,v 1.14 2022/11/11 17:07:38 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int numbits = -1;
char *strbits = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&dsaparam_config, 0, sizeof(dsaparam_config));
-/* $OpenBSD: ec.c,v 1.14 2019/07/14 03:30:45 guenther Exp $ */
+/* $OpenBSD: ec.c,v 1.15 2022/11/11 17:07:38 joshua Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
BIO *in = NULL, *out = NULL;
char *passin = NULL, *passout = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&ec_config, 0, sizeof(ec_config));
-/* $OpenBSD: ecparam.c,v 1.21 2021/05/10 20:58:32 tb Exp $ */
+/* $OpenBSD: ecparam.c,v 1.22 2022/11/11 17:07:38 joshua Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
BIO *in = NULL, *out = NULL;
int i, ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&ecparam_config, 0, sizeof(ecparam_config));
-/* $OpenBSD: enc.c,v 1.24 2021/12/07 20:13:15 tb Exp $ */
+/* $OpenBSD: enc.c,v 1.25 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
char pname[PROG_NAME_SIZE + 1];
int i;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&enc_config, 0, sizeof(enc_config));
-/* $OpenBSD: errstr.c,v 1.7 2019/07/14 03:30:45 guenther Exp $ */
+/* $OpenBSD: errstr.c,v 1.8 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
char buf[256];
int ret = 0;
- if (single_execution) {
- if (pledge("stdio rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&errstr_config, 0, sizeof(errstr_config));
-/* $OpenBSD: gendh.c,v 1.12 2021/11/20 18:10:48 tb Exp $ */
+/* $OpenBSD: gendh.c,v 1.13 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BIO *out = NULL;
char *strbits = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
if ((cb = BN_GENCB_new()) == NULL) {
-/* $OpenBSD: gendsa.c,v 1.15 2022/01/14 09:25:00 tb Exp $ */
+/* $OpenBSD: gendsa.c,v 1.16 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
char *passout = NULL;
BIO *out = NULL, *in = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&gendsa_config, 0, sizeof(gendsa_config));
-/* $OpenBSD: genpkey.c,v 1.13 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: genpkey.c,v 1.14 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006
*/
char *pass = NULL;
int ret = 1, rv;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&genpkey_config, 0, sizeof(genpkey_config));
-/* $OpenBSD: genrsa.c,v 1.20 2022/10/04 15:31:02 espie Exp $ */
+/* $OpenBSD: genrsa.c,v 1.21 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
RSA *rsa = NULL;
char *rsa_e_hex = NULL, *rsa_e_dec = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
if ((bn = BN_new()) == NULL)
-/* $OpenBSD: nseq.c,v 1.9 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: nseq.c,v 1.10 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
NETSCAPE_CERT_SEQUENCE *seq = NULL;
int i, ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&nseq_config, 0, sizeof(nseq_config));
-/* $OpenBSD: ocsp.c,v 1.21 2020/10/13 18:25:35 tb Exp $ */
+/* $OpenBSD: ocsp.c,v 1.22 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
X509 *rca_cert = NULL;
CA_DB *rdb = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath inet dns tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath inet dns tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&ocsp_config, 0, sizeof(ocsp_config));
-/* $OpenBSD: openssl.c,v 1.30 2019/11/04 15:25:54 jsing Exp $ */
+/* $OpenBSD: openssl.c,v 1.31 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#define FUNC_TYPE_MD_ALG 5
#define FUNC_TYPE_CIPHER_ALG 6
-int single_execution = 0;
-
typedef struct {
int type;
const char *name;
static LHASH_OF(FUNCTION) *prog_init(void);
static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[]);
+static void print_help(void);
static void list_pkey(BIO * out);
static void list_cipher(BIO * out);
static void list_md(BIO * out);
main(int argc, char **argv)
{
ARGS arg;
-#define PROG_NAME_SIZE 39
- char pname[PROG_NAME_SIZE + 1];
- FUNCTION f, *fp;
- const char *prompt;
- char buf[1024];
char *to_free = NULL;
- int n, i, ret = 0;
+ int i, ret = 0;
char *p;
LHASH_OF(FUNCTION) * prog = NULL;
long errline;
prog = prog_init();
- /* first check the program name */
- program_name(argv[0], pname, sizeof pname);
-
- f.name = pname;
- fp = lh_FUNCTION_retrieve(prog, &f);
- if (fp != NULL) {
- argv[0] = pname;
-
- single_execution = 1;
- ret = fp->func(argc, argv);
- goto end;
- }
/*
* ok, now check that there are not arguments, if there are, run with
- * them, shifting the ssleay off the front
+ * them, shifting the executable name off the front
*/
- if (argc != 1) {
- argc--;
- argv++;
-
- single_execution = 1;
- ret = do_cmd(prog, argc, argv);
- if (ret < 0)
- ret = 0;
+ argc--;
+ argv++;
+
+ if (argc < 1) {
+ print_help();
goto end;
}
- /* ok, lets enter the old 'OpenSSL>' mode */
- for (;;) {
+ ret = do_cmd(prog, argc, argv);
+ if (ret < 0)
ret = 0;
- p = buf;
- n = sizeof buf;
- i = 0;
- for (;;) {
- p[0] = '\0';
- if (i++)
- prompt = ">";
- else
- prompt = "OpenSSL> ";
- fputs(prompt, stdout);
- fflush(stdout);
- if (!fgets(p, n, stdin))
- goto end;
- if (p[0] == '\0')
- goto end;
- i = strlen(p);
- if (i <= 1)
- break;
- if (p[i - 2] != '\\')
- break;
- i -= 2;
- p += i;
- n -= i;
- }
- if (!chopup_args(&arg, buf, &argc, &argv))
- break;
-
- ret = do_cmd(prog, argc, argv);
- if (ret < 0) {
- ret = 0;
- goto end;
- }
- if (ret != 0)
- BIO_printf(bio_err, "error in %s\n", argv[0]);
- (void) BIO_flush(bio_err);
- }
- BIO_printf(bio_err, "bad exit\n");
- ret = 1;
end:
free(to_free);
do_cmd(LHASH_OF(FUNCTION) * prog, int argc, char *argv[])
{
FUNCTION f, *fp;
- int i, ret = 1, tp, nl;
+ int ret = 1;
if ((argc <= 0) || (argv[0] == NULL)) {
ret = 0;
BIO_printf(bio_stdout, "%s\n", argv[0] + 3);
BIO_free_all(bio_stdout);
goto end;
- } else if ((strcmp(argv[0], "quit") == 0) ||
- (strcmp(argv[0], "q") == 0) ||
- (strcmp(argv[0], "exit") == 0) ||
- (strcmp(argv[0], "bye") == 0)) {
- ret = -1;
- goto end;
} else if ((strcmp(argv[0], LIST_STANDARD_COMMANDS) == 0) ||
(strcmp(argv[0], LIST_MESSAGE_DIGEST_COMMANDS) == 0) ||
(strcmp(argv[0], LIST_MESSAGE_DIGEST_ALGORITHMS) == 0) ||
BIO_printf(bio_err,
"openssl:Error: '%s' is an invalid command.\n",
argv[0]);
- BIO_printf(bio_err, "\nStandard commands");
- i = 0;
- tp = 0;
- for (fp = functions; fp->name != NULL; fp++) {
- nl = 0;
+ print_help();
+ ret = 0;
+ }
+ end:
+ return (ret);
+}
+
+static void
+print_help(void)
+{
+ FUNCTION *fp;
+ int i = 0;
+ int tp = 0;
+ int nl;
+
+ BIO_printf(bio_err, "\nStandard commands");
+ for (fp = functions; fp->name != NULL; fp++) {
+ nl = 0;
#ifdef OPENSSL_NO_CAMELLIA
- if (((i++) % 5) == 0)
+ if (((i++) % 5) == 0)
#else
- if (((i++) % 4) == 0)
+ if (((i++) % 4) == 0)
#endif
- {
+ {
+ BIO_printf(bio_err, "\n");
+ nl = 1;
+ }
+ if (fp->type != tp) {
+ tp = fp->type;
+ if (!nl)
BIO_printf(bio_err, "\n");
- nl = 1;
- }
- if (fp->type != tp) {
- tp = fp->type;
- if (!nl)
- BIO_printf(bio_err, "\n");
- if (tp == FUNC_TYPE_MD) {
- i = 1;
- BIO_printf(bio_err,
- "\nMessage Digest commands (see the `dgst' command for more details)\n");
- } else if (tp == FUNC_TYPE_CIPHER) {
- i = 1;
- BIO_printf(bio_err, "\nCipher commands (see the `enc' command for more details)\n");
- }
+ if (tp == FUNC_TYPE_MD) {
+ i = 1;
+ BIO_printf(bio_err,
+ "\nMessage Digest commands (see the `dgst' command for more details)\n");
+ } else if (tp == FUNC_TYPE_CIPHER) {
+ i = 1;
+ BIO_printf(bio_err, "\nCipher commands (see the `enc' command for more details)\n");
}
+ }
#ifdef OPENSSL_NO_CAMELLIA
- BIO_printf(bio_err, "%-15s", fp->name);
+ BIO_printf(bio_err, "%-15s", fp->name);
#else
- BIO_printf(bio_err, "%-18s", fp->name);
+ BIO_printf(bio_err, "%-18s", fp->name);
#endif
- }
- BIO_printf(bio_err, "\n\n");
- ret = 0;
}
- end:
- return (ret);
+
+ BIO_printf(bio_err, "\n\n");
}
static int
-/* $OpenBSD: passwd.c,v 1.12 2021/12/12 20:40:25 tb Exp $ */
+/* $OpenBSD: passwd.c,v 1.13 2022/11/11 17:07:39 joshua Exp $ */
#if defined OPENSSL_NO_MD5
#define NO_MD5CRYPT_1
int argsused;
int ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&passwd_config, 0, sizeof(passwd_config));
-/* $OpenBSD: pkcs12.c,v 1.23 2022/09/14 16:31:36 tb Exp $ */
+/* $OpenBSD: pkcs12.c,v 1.24 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
char *cpass = NULL, *mpass = NULL;
char *passin = NULL, *passout = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&pkcs12_config, 0, sizeof(pkcs12_config));
-/* $OpenBSD: pkcs7.c,v 1.11 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: pkcs7.c,v 1.12 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int ret = 1;
int i;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&pkcs7_config, 0, sizeof(pkcs7_config));
-/* $OpenBSD: pkcs8.c,v 1.14 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: pkcs8.c,v 1.15 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999-2004.
*/
char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
int ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&pkcs8_config, 0, sizeof(pkcs8_config));
-/* $OpenBSD: pkey.c,v 1.17 2022/01/14 10:17:30 tb Exp $ */
+/* $OpenBSD: pkey.c,v 1.18 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006
*/
char *passin = NULL, *passout = NULL;
int ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&pkey_config, 0, sizeof(pkey_config));
-/* $OpenBSD: pkeyparam.c,v 1.14 2022/01/14 10:17:30 tb Exp $ */
+/* $OpenBSD: pkeyparam.c,v 1.15 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006
*/
EVP_PKEY *pkey = NULL;
int ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&pkeyparam_config, 0, sizeof(pkeyparam_config));
-/* $OpenBSD: pkeyutl.c,v 1.16 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: pkeyutl.c,v 1.17 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
int ret = 1, rv = -1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&pkeyutl_config, 0, sizeof(pkeyutl_config));
-/* $OpenBSD: prime.c,v 1.13 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: prime.c,v 1.14 2022/11/11 17:07:39 joshua Exp $ */
/* ====================================================================
* Copyright (c) 2004 The OpenSSL Project. All rights reserved.
*
char *s;
int is_prime, ret = 1;
- if (single_execution) {
- if (pledge("stdio rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&prime_config, 0, sizeof(prime_config));
-/* $OpenBSD: rand.c,v 1.14 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: rand.c,v 1.15 2022/11/11 17:07:39 joshua Exp $ */
/* ====================================================================
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
*
int i, r;
BIO *out = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&rand_config, 0, sizeof(rand_config));
-/* $OpenBSD: req.c,v 1.23 2022/02/03 17:44:04 tb Exp $ */
+/* $OpenBSD: req.c,v 1.24 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
const EVP_MD *md_alg = NULL;
char *p;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&req_config, 0, sizeof(req_config));
-/* $OpenBSD: rsa.c,v 1.16 2022/01/14 09:26:41 tb Exp $ */
+/* $OpenBSD: rsa.c,v 1.17 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BIO *out = NULL;
char *passin = NULL, *passout = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&rsa_config, 0, sizeof(rsa_config));
-/* $OpenBSD: rsautl.c,v 1.18 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: rsautl.c,v 1.19 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
int keysize;
int ret = 1;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&rsautl_config, 0, sizeof(rsautl_config));
-/* $OpenBSD: s_client.c,v 1.58 2022/02/03 17:44:04 tb Exp $ */
+/* $OpenBSD: s_client.c,v 1.59 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
struct sockaddr_storage peer;
int peerlen = sizeof(peer);
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath inet dns tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath inet dns tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&s_client_config, 0, sizeof(s_client_config));
-/* $OpenBSD: s_server.c,v 1.54 2021/12/06 11:06:58 tb Exp $ */
+/* $OpenBSD: s_server.c,v 1.55 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
X509 *s_cert2 = NULL;
tlsextalpnctx alpn_ctx = { NULL, 0 };
- if (single_execution) {
- if (pledge("stdio rpath inet dns tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio rpath inet dns tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&s_server_config, 0, sizeof(s_server_config));
-/* $OpenBSD: s_time.c,v 1.35 2022/08/31 12:29:08 tb Exp $ */
+/* $OpenBSD: s_time.c,v 1.36 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
{
int ret = 1;
- if (single_execution) {
- if (pledge("stdio rpath inet dns", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio rpath inet dns", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
s_time_meth = TLS_client_method();
-/* $OpenBSD: sess_id.c,v 1.10 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: sess_id.c,v 1.11 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int ret = 1, i;
BIO *out = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&sess_id_config, 0, sizeof(sess_id_config));
-/* $OpenBSD: smime.c,v 1.17 2022/01/16 07:12:28 inoguchi Exp $ */
+/* $OpenBSD: smime.c,v 1.18 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
int badarg = 0;
char *passin = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&smime_config, 0, sizeof(smime_config));
-/* $OpenBSD: speed.c,v 1.28 2022/01/14 09:27:30 tb Exp $ */
+/* $OpenBSD: speed.c,v 1.29 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int multi = 0;
const char *errstr = NULL;
- if (single_execution) {
- if (pledge("stdio proc", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio proc", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
usertime = -1;
-/* $OpenBSD: spkac.c,v 1.11 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: spkac.c,v 1.12 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999. Based on an original idea by Massimiliano Pala
* (madwolf@openca.org).
NETSCAPE_SPKI *spki = NULL;
EVP_PKEY *pkey = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&spkac_config, 0, sizeof(spkac_config));
-/* $OpenBSD: ts.c,v 1.24 2022/09/11 18:08:17 tb Exp $ */
+/* $OpenBSD: ts.c,v 1.25 2022/11/11 17:07:39 joshua Exp $ */
/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
* project 2002.
*/
CONF *conf = NULL;
char *password = NULL; /* Password itself. */
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&ts_config, 0, sizeof(ts_config));
-/* $OpenBSD: verify.c,v 1.14 2021/02/15 17:57:58 jsing Exp $ */
+/* $OpenBSD: verify.c,v 1.15 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int argsused;
int ret = 1;
- if (single_execution) {
- if (pledge("stdio rpath", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio rpath", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&verify_config, 0, sizeof(verify_config));
-/* $OpenBSD: version.c,v 1.9 2019/07/14 03:30:46 guenther Exp $ */
+/* $OpenBSD: version.c,v 1.10 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int
version_main(int argc, char **argv)
{
- if (single_execution) {
- if (pledge("stdio", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&version_config, 0, sizeof(version_config));
-/* $OpenBSD: x509.c,v 1.29 2021/12/12 20:34:04 tb Exp $ */
+/* $OpenBSD: x509.c,v 1.30 2022/11/11 17:07:39 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
CONF *extconf = NULL;
char *passin = NULL;
- if (single_execution) {
- if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
- perror("pledge");
- exit(1);
- }
+ if (pledge("stdio cpath wpath rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
}
memset(&x509_config, 0, sizeof(x509_config));