diff options
author | Richard Levitte <levitte@openssl.org> | 2020-07-30 10:09:43 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-08-20 12:37:35 +0200 |
commit | 2274d22d39fd65b83c9c969cba86c8f03b3e0bec (patch) | |
tree | dd86a9ea759bc5d2d1bd541afe0d28a929018e6d /apps/include | |
parent | 6cc1dfca88c565ddacd9ea9aa8261ef9c0c37335 (diff) |
STORE: Distinguish public keys from private keys
While public keys and private keys use the same type (EVP_PKEY), just
with different contents, callers still need to distinguish between the
two to be able to know what functions to call with them (for example,
to be able to choose between EVP_PKEY_print_private() and
EVP_PKEY_print_public()).
The OSSL_STORE backend knows what it loaded, so it has the capacity to
inform.
Note that the same as usual still applies, that a private key EVP_PKEY
contains the public parts, but not necessarily the other way around.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12673)
Diffstat (limited to 'apps/include')
-rw-r--r-- | apps/include/apps.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/include/apps.h b/apps/include/apps.h index 0ee8e070cd..0e734a528e 100644 --- a/apps/include/apps.h +++ b/apps/include/apps.h @@ -119,7 +119,8 @@ int load_crls(const char *file, STACK_OF(X509_CRL) **crls, int format, const char *pass, const char *desc); int load_key_cert_crl(const char *uri, int maybe_stdin, const char *pass, const char *desc, - EVP_PKEY **ppkey, X509 **pcert, X509_CRL **pcrl); + EVP_PKEY **ppkey, EVP_PKEY **ppubkey, + X509 **pcert, X509_CRL **pcrl); X509_STORE *setup_verify(const char *CAfile, int noCAfile, const char *CApath, int noCApath, const char *CAstore, int noCAstore); |