summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/tls-provider.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/tls-provider.c b/test/tls-provider.c
index 53e1d53ffa..6d66fdf8e1 100644
--- a/test/tls-provider.c
+++ b/test/tls-provider.c
@@ -2691,6 +2691,10 @@ static int xor_sig_setup_md(PROV_XORSIG_CTX *ctx,
OPENSSL_free(ctx->aid);
ctx->aid = NULL;
ctx->aid_len = xor_get_aid(&(ctx->aid), ctx->sig->tls_name);
+ if (ctx->aid_len <= 0) {
+ EVP_MD_free(md);
+ return 0;
+ }
ctx->mdctx = NULL;
ctx->md = md;