STORE: clear err after ossl_store_get0_loader_int
authorDaniel Bevenius <daniel.bevenius@gmail.com>
Thu, 17 Sep 2020 07:48:29 +0000 (09:48 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Tue, 8 Dec 2020 17:23:29 +0000 (18:23 +0100)
commitc60b5723194952d2e4bbfc1e4a3eb07b7581edd9
treed0825a667604c06cdb2539d2171c00b17bdadb0f
parente0b5058c11e8059fc6290139f8fc21898fe0ca63
STORE: clear err after ossl_store_get0_loader_int

This commit clears the error that might have been set when
ossl_store_get0_loader_int has been called as it will try to retrieve
a loader for the scheme on an empty store, which will cause the error
OSSL_STORE_R_UNREGISTERED_SCHEME to be set.

The motivation for this after returning from
ossl_store_get0_loader_int, OSSL_STORE_attach will continue and try to
fetch a OSSL_STORE_LOADER from the provider.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12901)
crypto/store/store_lib.c
test/ossl_store_test.c