summaryrefslogtreecommitdiff
path: root/test/upcallstest.c
diff options
context:
space:
mode:
authorMichael Baentsch <info@baentsch.ch>2021-10-07 10:45:48 +0200
committerTomas Mraz <tomas@openssl.org>2021-10-22 16:26:46 +0200
commit4f716249643fe97a2bdf59a11cc10e1bef8103e9 (patch)
tree9b50786735838d671b3bf6285dd3410efd058b7b /test/upcallstest.c
parent25ead551aa31feae91cab91b648a2ca16bc7a8dc (diff)
downloadopenssl-new-4f716249643fe97a2bdf59a11cc10e1bef8103e9.tar.gz
Permit no/empty digest in core_obj_add_sigid
Also add digest parameter documentation for add_sigid and permit NULL as digest name in the provider upcall. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16770)
Diffstat (limited to 'test/upcallstest.c')
-rw-r--r--test/upcallstest.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/upcallstest.c b/test/upcallstest.c
index 01e4e95237..76899fee3d 100644
--- a/test/upcallstest.c
+++ b/test/upcallstest.c
@@ -68,6 +68,15 @@ static int obj_provider_init(const OSSL_CORE_HANDLE *handle,
if (!c_obj_add_sigid(handle, SIGALG_OID, DIGEST_SN, SIG_LN))
return 0;
+ /* additional tests checking empty digest algs are accepted, too */
+ if (!c_obj_add_sigid(handle, SIGALG_OID, "", SIG_LN))
+ return 0;
+ if (!c_obj_add_sigid(handle, SIGALG_OID, NULL, SIG_LN))
+ return 0;
+ /* checking wrong digest alg name is rejected: */
+ if (c_obj_add_sigid(handle, SIGALG_OID, "NonsenseAlg", SIG_LN))
+ return 0;
+
return 1;
}