diff options
author | Pauli <ppzgs1@gmail.com> | 2021-03-13 10:34:49 +1000 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-03-16 09:19:20 +1000 |
commit | 1e08f3ba9ec495fbd4a4cd6a411dc4e052626eda (patch) | |
tree | 5f63db4a780d59bb20bb60a78fd221cf7a880e4e /crypto/property | |
parent | bd55a0be1b5696f643863718e7aa916feccafdf4 (diff) |
property: default queries create the property values.
Without this, it is necessary to query an algorithm before setting the default
property query. With this, the value will be created and the default will
work.
Fixes #14516
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14542)
Diffstat (limited to 'crypto/property')
-rw-r--r-- | crypto/property/property.c | 2 | ||||
-rw-r--r-- | crypto/property/property_parse.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crypto/property/property.c b/crypto/property/property.c index 985709b204..b6e295e5cd 100644 --- a/crypto/property/property.c +++ b/crypto/property/property.c @@ -357,7 +357,7 @@ int ossl_method_store_fetch(OSSL_METHOD_STORE *store, int nid, } if (prop_query != NULL) - p2 = pq = ossl_parse_query(store->ctx, prop_query); + p2 = pq = ossl_parse_query(store->ctx, prop_query, 0); plp = ossl_ctx_global_properties(store->ctx, 0); if (plp != NULL && *plp != NULL) { if (pq == NULL) { diff --git a/crypto/property/property_parse.c b/crypto/property/property_parse.c index 9bc89f4d42..b182f00d0a 100644 --- a/crypto/property/property_parse.c +++ b/crypto/property/property_parse.c @@ -385,7 +385,8 @@ err: return res; } -OSSL_PROPERTY_LIST *ossl_parse_query(OSSL_LIB_CTX *ctx, const char *s) +OSSL_PROPERTY_LIST *ossl_parse_query(OSSL_LIB_CTX *ctx, const char *s, + int create_values) { STACK_OF(PROPERTY_DEFINITION) *sk; OSSL_PROPERTY_LIST *res = NULL; @@ -425,7 +426,7 @@ OSSL_PROPERTY_LIST *ossl_parse_query(OSSL_LIB_CTX *ctx, const char *s) prop->v.str_val = ossl_property_true; goto skip_value; } - if (!parse_value(ctx, &s, prop, 0)) + if (!parse_value(ctx, &s, prop, create_values)) prop->type = PROPERTY_TYPE_VALUE_UNDEFINED; skip_value: |