Skip to content

Commit 30c59f9

Browse files
committed
Handle unsupported URI prefixes in provider store_open()
1 parent fd8cbb4 commit 30c59f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/provider.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,9 @@ static void *store_open(void *ctx, const char *uri)
584584
P11_STORE_CTX *store_ctx;
585585
PROVIDER_CTX *prov_ctx = (PROVIDER_CTX *)ctx;
586586

587+
if (!uri || strncasecmp(uri, "pkcs11:", 7) != 0) {
588+
return NULL; /* This provider doesn't handle this URI */
589+
}
587590
if (!prov_ctx->initialized) {
588591
/* Set parameters into the util_ctx */
589592
if (!PROVIDER_CTX_set_parameters(prov_ctx)) {

0 commit comments

Comments
 (0)