This PR resolves the issue by forward-declaring the OQS_SIG type in sig_stfl.h. This fixes the failing oqs-provider build: see the downstream tests before and after.
I don't believe that the forward-declaration violates any C programming rules / best practices, but it would be great if someone with more experience could confirm this.
[ ] Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)
[ ] Does this PR change the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API? (If so, PRs in fully supported downstream projects dependent on these, i.e., oqs-provider will also need to be ready for review and merge by the time this is merged.)
When an application (e.g.,
oqs-provider
) includes<oqs/sig.h>
, the following happens:sig.h
includesoqs.h
at the top of the file.oqs.h
includessig.h
, but this include is skipped because of theOQS_SIG_H
include guard.oqs.h
includessig_stfl.h
.sig_stfl.h
referencesOQS_SIG
, which has not yet been defined.This breaks the application's build: see https://github.com/open-quantum-safe/liboqs/issues/1815, https://github.com/open-quantum-safe/oqs-provider/issues/427, and https://github.com/open-quantum-safe/oqs-demos/issues/281.
This PR resolves the issue by forward-declaring the OQS_SIG type in
sig_stfl.h
. This fixes the failingoqs-provider
build: see the downstream tests before and after.I don't believe that the forward-declaration violates any C programming rules / best practices, but it would be great if someone with more experience could confirm this.