Skip to content

Commit

Permalink
fix for no signatures defined error
Browse files Browse the repository at this point in the history
  • Loading branch information
bencemali committed May 13, 2024
1 parent 6ae3eca commit b54ab47
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions oqsprov/oqsprov_capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,24 @@ static int oqs_group_capability(OSSL_CALLBACK *cb, void *arg)
OSSL_PARAM_END \
}

#if defined(OQS_ENABLE_SIG_dilithium_2) \
|| defined(OQS_ENABLE_SIG_dilithium_3) \
|| defined(OQS_ENABLE_SIG_dilithium_5) \
|| defined(OQS_ENABLE_SIG_ml_dsa_44) \
|| defined(OQS_ENABLE_SIG_ml_dsa_65) \
|| defined(OQS_ENABLE_SIG_ml_dsa_87) \
|| defined(OQS_ENABLE_SIG_falcon_512) \
|| defined(OQS_ENABLE_SIG_falcon_padded_512) \
|| defined(OQS_ENABLE_SIG_falcon_1024) \
|| defined(OQS_ENABLE_SIG_falcon_padded_1024) \
|| defined(OQS_ENABLE_SIG_sphincs_sha2_128f_simple) \
|| defined(OQS_ENABLE_SIG_sphincs_sha2_128s_simple) \
|| defined(OQS_ENABLE_SIG_sphincs_sha2_192f_simple) \
|| defined(OQS_ENABLE_SIG_sphincs_shake_128f_simple)
#define OQS_SIGNATURES_USED
#endif

#ifdef OQS_SIGNATURES_USED
static const OSSL_PARAM oqs_param_sigalg_list[][12] = {
///// OQS_TEMPLATE_FRAGMENT_SIGALG_NAMES_START
# ifdef OQS_ENABLE_SIG_dilithium_2
Expand Down Expand Up @@ -737,11 +755,14 @@ static const OSSL_PARAM oqs_param_sigalg_list[][12] = {
rsa3072_sphincsshake128fsimple,
rsa3072_sphincsshake128fsimple, "1.3.9999.6.7.15", 47),
# endif

///// OQS_TEMPLATE_FRAGMENT_SIGALG_NAMES_END
};
#endif

static int oqs_sigalg_capability(OSSL_CALLBACK *cb, void *arg)
{
#ifdef OQS_SIGNATURES_USED
size_t i;

// relaxed assertion for the case that not all algorithms are enabled in
Expand All @@ -751,6 +772,7 @@ static int oqs_sigalg_capability(OSSL_CALLBACK *cb, void *arg)
if (!cb(oqs_param_sigalg_list[i], arg))
return 0;
}
#endif

return 1;
}
Expand Down

0 comments on commit b54ab47

Please sign in to comment.