summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPauli <ppzgs1@gmail.com>2021-02-09 11:55:59 +1000
committerPauli <ppzgs1@gmail.com>2021-02-12 12:28:55 +1000
commitca2c778c26d488bd923121d7e4718b580fd283f2 (patch)
tree172b17d2075ea0fe4b40b297badf328b0c2afdf2 /test
parent7dd5a00f410206974d4ee134bb0ca05bf0f42061 (diff)
test: filter provider honours the no_cache setting.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14126)
Diffstat (limited to 'test')
-rw-r--r--test/filterprov.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/filterprov.c b/test/filterprov.c
index 3cfb095ae5..93ebca70ae 100644
--- a/test/filterprov.c
+++ b/test/filterprov.c
@@ -33,6 +33,7 @@ struct filter_prov_globals_st {
OSSL_ALGORITHM alg[MAX_ALG_FILTERS + 1];
} dispatch[MAX_FILTERS];
int num_dispatch;
+ int no_cache;
};
static struct filter_prov_globals_st ourglobals;
@@ -83,7 +84,7 @@ static const OSSL_ALGORITHM *filter_query(void *provctx,
for (i = 0; i < globs->num_dispatch; i++) {
if (globs->dispatch[i].operation == operation_id) {
- *no_cache = 0;
+ *no_cache = globs->no_cache;
return globs->dispatch[i].alg;
}
}
@@ -156,10 +157,6 @@ int filter_provider_set_filter(int operation, const char *filterstr)
if (filterstrtmp == NULL)
goto err;
- /* We don't support no_cache */
- if (no_cache)
- goto err;
-
/* Nothing to filter */
if (provalgs == NULL)
goto err;
@@ -199,6 +196,7 @@ int filter_provider_set_filter(int operation, const char *filterstr)
}
globs->dispatch[globs->num_dispatch].operation = operation;
+ globs->no_cache = no_cache;
globs->num_dispatch++;
ret = 1;