diff options
| author | tb <> | 2024-08-29 17:01:02 +0000 |
|---|---|---|
| committer | tb <> | 2024-08-29 17:01:02 +0000 |
| commit | 848d87c5d247d338a63f76d6a86cad9016884aad (patch) | |
| tree | 7ea546b46cd3970f3bc3adc5466a9a5dc89fd00d /src/usr.bin/openssl/apps.c | |
| parent | c8099c070f0c547b73edced83591dbd871254307 (diff) | |
| download | openbsd-848d87c5d247d338a63f76d6a86cad9016884aad.tar.gz openbsd-848d87c5d247d338a63f76d6a86cad9016884aad.tar.bz2 openbsd-848d87c5d247d338a63f76d6a86cad9016884aad.zip | |
Remove check and pubcheck from openssl pkey and pkeyparam
The underlying API will be removed, so these commands have to go.
ok beck
Diffstat (limited to 'src/usr.bin/openssl/apps.c')
| -rw-r--r-- | src/usr.bin/openssl/apps.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index f58aa5365f..a04190910d 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.68 2024/08/18 20:24:11 tb Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.69 2024/08/29 17:01:02 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -2156,31 +2156,3 @@ show_cipher(const OBJ_NAME *name, void *arg) | |||
| 2156 | 2156 | ||
| 2157 | fprintf(stderr, " -%-24s%s", name->name, (++*n % 3 != 0 ? "" : "\n")); | 2157 | fprintf(stderr, " -%-24s%s", name->name, (++*n % 3 != 0 ? "" : "\n")); |
| 2158 | } | 2158 | } |
| 2159 | |||
| 2160 | int | ||
| 2161 | pkey_check(BIO *out, EVP_PKEY *pkey, int (check_fn)(EVP_PKEY_CTX *), | ||
| 2162 | const char *desc) | ||
| 2163 | { | ||
| 2164 | EVP_PKEY_CTX *ctx; | ||
| 2165 | |||
| 2166 | if ((ctx = EVP_PKEY_CTX_new(pkey, NULL)) == NULL) { | ||
| 2167 | ERR_print_errors(bio_err); | ||
| 2168 | return 0; | ||
| 2169 | } | ||
| 2170 | |||
| 2171 | if (check_fn(ctx) == 1) { | ||
| 2172 | BIO_printf(out, "%s valid\n", desc); | ||
| 2173 | } else { | ||
| 2174 | unsigned long err; | ||
| 2175 | |||
| 2176 | BIO_printf(out, "%s invalid\n", desc); | ||
| 2177 | |||
| 2178 | while ((err = ERR_get_error()) != 0) | ||
| 2179 | BIO_printf(out, "Detailed error: %s\n", | ||
| 2180 | ERR_reason_error_string(err)); | ||
| 2181 | } | ||
| 2182 | |||
| 2183 | EVP_PKEY_CTX_free(ctx); | ||
| 2184 | |||
| 2185 | return 1; | ||
| 2186 | } | ||
