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 /crypto/store/store_strings.c | |
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 'crypto/store/store_strings.c')
-rw-r--r-- | crypto/store/store_strings.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/store/store_strings.c b/crypto/store/store_strings.c index 84cfdcfe6b..97497c8a78 100644 --- a/crypto/store/store_strings.c +++ b/crypto/store/store_strings.c @@ -12,6 +12,7 @@ static char *type_strings[] = { "Name", /* OSSL_STORE_INFO_NAME */ "Parameters", /* OSSL_STORE_INFO_PARAMS */ + "Public key", /* OSSL_STORE_INFO_PUBKEY */ "Pkey", /* OSSL_STORE_INFO_PKEY */ "Certificate", /* OSSL_STORE_INFO_CERT */ "CRL" /* OSSL_STORE_INFO_CRL */ |