]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
STORE: Make OSSL_STORE_LOADER_fetch() consistent with all other fetch functions
authorRichard Levitte <levitte@openssl.org>
Thu, 10 Jun 2021 05:25:56 +0000 (07:25 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 11 Jun 2021 07:09:21 +0000 (09:09 +0200)
The argument order was different on this one.

Fixes #15688

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15689)

crypto/store/store_lib.c
crypto/store/store_meth.c
doc/man3/OSSL_STORE_LOADER.pod
include/openssl/store.h

index f7939ea0dd49adea64abfa46e2eaee2d421f4154..c0d9dafbdf38cd2800def240ffe293d8f501d062 100644 (file)
@@ -122,7 +122,7 @@ OSSL_STORE_open_ex(const char *uri, OSSL_LIB_CTX *libctx, const char *propq,
 #endif
         if (loader == NULL
             && (fetched_loader =
-                OSSL_STORE_LOADER_fetch(schemes[i], libctx, propq)) != NULL) {
+                OSSL_STORE_LOADER_fetch(libctx, schemes[i], propq)) != NULL) {
             const OSSL_PROVIDER *provider =
                 OSSL_STORE_LOADER_get0_provider(fetched_loader);
             void *provctx = OSSL_PROVIDER_get0_provider_ctx(provider);
@@ -975,7 +975,7 @@ OSSL_STORE_CTX *OSSL_STORE_attach(BIO *bp, const char *scheme,
 #endif
     if (loader == NULL
         && (fetched_loader =
-            OSSL_STORE_LOADER_fetch(scheme, libctx, propq)) != NULL) {
+            OSSL_STORE_LOADER_fetch(libctx, scheme, propq)) != NULL) {
         const OSSL_PROVIDER *provider =
             OSSL_STORE_LOADER_get0_provider(fetched_loader);
         void *provctx = OSSL_PROVIDER_get0_provider_ctx(provider);
index cf2d1c6bbad303ccf572ddef363aa515c57c732b..a48e40d8c83fdf56105eb90985683dcacf9a46cd 100644 (file)
@@ -251,7 +251,7 @@ static void *construct_loader(const OSSL_ALGORITHM *algodef,
 
     /*
      * Flag to indicate that there was actual construction errors.  This
-     * helps inner_evp_generic_fetch() determine what error it should
+     * helps inner_loader_fetch() determine what error it should
      * record on inaccessible algorithms.
      */
     if (method == NULL)
@@ -355,8 +355,8 @@ static OSSL_STORE_LOADER *inner_loader_fetch(OSSL_LIB_CTX *libctx,
     return method;
 }
 
-OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(const char *scheme,
-                                           OSSL_LIB_CTX *libctx,
+OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX *libctx,
+                                           const char *scheme,
                                            const char *properties)
 {
     return inner_loader_fetch(libctx, 0, scheme, properties);
index 04fd318897f99d48f745b71e3db7c0311c48c70d..d150d24b492c5047be12633497ef9134d012f614 100644 (file)
@@ -33,8 +33,8 @@ unregister STORE loaders for different URI schemes
 
  typedef struct ossl_store_loader_st OSSL_STORE_LOADER;
 
- OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(const char *scheme,
-                                            OSSL_LIB_CTX *libctx,
+ OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX *libctx,
+                                            const char *scheme,
                                             const char *properties);
  int OSSL_STORE_LOADER_up_ref(OSSL_STORE_LOADER *loader);
  void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader);
@@ -119,7 +119,7 @@ storage schemes.
 
 OSSL_STORE_LOADER_fetch() looks for an implementation for a storage
 I<scheme> within the providers that has been loaded into the B<OSSL_LIB_CTX>
-given by I<ctx>, and with the properties given by I<properties>.
+given by I<libctx>, and with the properties given by I<properties>.
 
 OSSL_STORE_LOADER_up_ref() increments the reference count for the given
 I<loader>.
index c3e9beeff6b7623fd062a122f6e610143a6a8389..3c1445e0e6ac5498c6ff910aa1dcbb052aa9a670 100644 (file)
@@ -253,8 +253,8 @@ int OSSL_STORE_find(OSSL_STORE_CTX *ctx, const OSSL_STORE_SEARCH *search);
 
 typedef struct ossl_store_loader_st OSSL_STORE_LOADER;
 
-OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(const char *scheme,
-                                           OSSL_LIB_CTX *libctx,
+OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX *libctx,
+                                           const char *scheme,
                                            const char *properties);
 int OSSL_STORE_LOADER_up_ref(OSSL_STORE_LOADER *loader);
 void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader);