Add OSSL_STORE_LOADER_description()
authorRichard Levitte <levitte@openssl.org>
Tue, 16 Mar 2021 13:30:59 +0000 (14:30 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 2 Apr 2021 06:57:47 +0000 (08:57 +0200)
Fixes #14514

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14656)

crypto/store/store_meth.c
doc/man3/OSSL_STORE_LOADER.pod
include/openssl/store.h
util/libcrypto.num

index e12e517cd190b70274d49a01dfccc79f8015d9ce..be78adaab811f2b032da490ca146fb725a72a7b6 100644 (file)
@@ -402,6 +402,11 @@ int OSSL_STORE_LOADER_number(const OSSL_STORE_LOADER *loader)
     return loader->scheme_id;
 }
 
+const char *OSSL_STORE_LOADER_description(const OSSL_STORE_LOADER *loader)
+{
+    return loader->description;
+}
+
 int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader, const char *name)
 {
     if (loader->prov != NULL) {
index 1cfce445b837571c524802c969ae8d8f4e85edfc..7413104079bdceb506fc243026fe716311cb4670 100644 (file)
@@ -10,6 +10,7 @@ OSSL_STORE_LOADER_provider,
 OSSL_STORE_LOADER_properties,
 OSSL_STORE_LOADER_is_a,
 OSSL_STORE_LOADER_number,
+OSSL_STORE_LOADER_description,
 OSSL_STORE_LOADER_do_all_provided,
 OSSL_STORE_LOADER_names_do_all,
 OSSL_STORE_LOADER_CTX, OSSL_STORE_LOADER_new,
@@ -42,6 +43,7 @@ unregister STORE loaders for different URI schemes
                                                  loader);
  const char *OSSL_STORE_LOADER_properties(const OSSL_STORE_LOADER *loader);
  int OSSL_STORE_LOADER_number(const OSSL_STORE_LOADER *loader);
+ const char *OSSL_STORE_LOADER_description(const OSSL_STORE_LOADER *loader);
  int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader,
                             const char *scheme);
  void OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX *libctx,
@@ -139,6 +141,10 @@ of an algorithm that's identifiable with I<scheme>.
 OSSL_STORE_LOADER_number() returns the internal dynamic number assigned
 to the given I<loader>.
 
+OSSL_STORE_LOADER_description() returns a description of the I<loader>, meant
+for display and human consumption.  The description is at the discretion of the
+I<loader> implementation.
+
 OSSL_STORE_LOADER_do_all_provided() traverses all store implementations
 by all activated providers in the library context I<libctx>, and for each
 of the implementations, calls I<fn> with the implementation method and
@@ -328,6 +334,9 @@ otherwise 0.
 
 OSSL_STORE_LOADER_number() returns an integer.
 
+OSSL_STORE_LOADER_description() returns a pointer to a decription, or NULL if
+there isn't one.
+
 The functions with the types B<OSSL_STORE_open_fn>,
 B<OSSL_STORE_open_ex_fn>, B<OSSL_STORE_ctrl_fn>,
 B<OSSL_STORE_expect_fn>, B<OSSL_STORE_load_fn>, B<OSSL_STORE_eof_fn>
index 19669b55f19ad98895a6268c7b7bf6c47350908f..f0c20e56feb22402647ee839853f74945567622c 100644 (file)
@@ -260,6 +260,7 @@ const OSSL_PROVIDER *OSSL_STORE_LOADER_provider(const OSSL_STORE_LOADER *
                                                 loader);
 const char *OSSL_STORE_LOADER_properties(const OSSL_STORE_LOADER *loader);
 int OSSL_STORE_LOADER_number(const OSSL_STORE_LOADER *loader);
+const char *OSSL_STORE_LOADER_description(const OSSL_STORE_LOADER *loader);
 int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader,
                            const char *scheme);
 void OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX *libctx,
index 203d50263b448301bc45fab8fdb2e738d1229552..eb84f1763ec6e766186dce4fde84cda817ae397c 100644 (file)
@@ -5335,3 +5335,4 @@ RSA_PSS_PARAMS_dup                      ? 3_0_0   EXIST::FUNCTION:
 EVP_PKEY_derive_set_peer_ex             ?      3_0_0   EXIST::FUNCTION:
 OSSL_DECODER_description                ?      3_0_0   EXIST::FUNCTION:
 OSSL_ENCODER_description                ?      3_0_0   EXIST::FUNCTION:
+OSSL_STORE_LOADER_description           ?      3_0_0   EXIST::FUNCTION: