summaryrefslogtreecommitdiff
path: root/include/internal
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-06-12 10:34:46 +1000
committerPauli <paul.dale@oracle.com>2020-06-23 21:44:47 +1000
commitf9e504e8b1d4da4b8c9c16ee4c11e9815a800422 (patch)
treea53b2ee1974b87cdc17f3367338ef4f8abead154 /include/internal
parent1b495200436b57309ca958a7a72affaf75171c1a (diff)
downloadopenssl-new-f9e504e8b1d4da4b8c9c16ee4c11e9815a800422.tar.gz
property: Move global default properties to the library context.
Fixes a problem where global properties don't work with a NULL query. Specifying an algorithm with a NULL query ignores the default properties. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12123)
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/cryptlib.h3
-rw-r--r--include/internal/property.h17
2 files changed, 12 insertions, 8 deletions
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index a4f18a5d3f..5118bfbe57 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -158,7 +158,8 @@ typedef struct ossl_ex_data_global_st {
# define OPENSSL_CTX_SERIALIZER_STORE_INDEX 10
# define OPENSSL_CTX_SELF_TEST_CB_INDEX 11
# define OPENSSL_CTX_BIO_PROV_INDEX 12
-# define OPENSSL_CTX_MAX_INDEXES 13
+# define OPENSSL_CTX_GLOBAL_PROPERTIES 13
+# define OPENSSL_CTX_MAX_INDEXES 14
typedef struct openssl_ctx_method {
void *(*new_func)(OPENSSL_CTX *ctx);
diff --git a/include/internal/property.h b/include/internal/property.h
index 2b2332b237..d8ff3582eb 100644
--- a/include/internal/property.h
+++ b/include/internal/property.h
@@ -42,13 +42,10 @@ int ossl_method_store_add(OSSL_METHOD_STORE *store, const OSSL_PROVIDER *prov,
int ossl_method_store_remove(OSSL_METHOD_STORE *store, int nid,
const void *method);
int ossl_method_store_fetch(OSSL_METHOD_STORE *store, int nid,
- const char *prop_query, void **result);
-int ossl_method_store_set_global_properties(OSSL_METHOD_STORE *store,
- const char *prop_query);
-int ossl_method_store_merge_global_properties(OSSL_METHOD_STORE *store,
- const char *prop_query);
-int ossl_method_store_global_property_is_enabled(OSSL_METHOD_STORE *store,
- const char *prop_name);
+ const char *prop_query, void **method);
+
+/* Get the global properties associate with the specified library context */
+OSSL_PROPERTY_LIST **ossl_ctx_global_properties(OPENSSL_CTX *ctx);
/* property query cache functions */
int ossl_method_store_cache_get(OSSL_METHOD_STORE *store, int nid,
@@ -57,4 +54,10 @@ int ossl_method_store_cache_set(OSSL_METHOD_STORE *store, int nid,
const char *prop_query, void *result,
int (*method_up_ref)(void *),
void (*method_destruct)(void *));
+void ossl_method_store_flush_cache(OSSL_METHOD_STORE *store);
+
+/* Merge two property queries together */
+OSSL_PROPERTY_LIST *ossl_property_merge(const OSSL_PROPERTY_LIST *a,
+ const OSSL_PROPERTY_LIST *b);
+
#endif