diff options
author | Michael Baentsch <info@baentsch.ch> | 2021-10-07 10:45:48 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-10-22 16:26:46 +0200 |
commit | 4f716249643fe97a2bdf59a11cc10e1bef8103e9 (patch) | |
tree | 9b50786735838d671b3bf6285dd3410efd058b7b /test | |
parent | Doc: be explicit about NUL in max_identity_len (diff) | |
download | openssl-4f716249643fe97a2bdf59a11cc10e1bef8103e9.tar.xz openssl-4f716249643fe97a2bdf59a11cc10e1bef8103e9.zip |
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')
-rw-r--r-- | test/upcallstest.c | 9 |
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; } |