Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify_inner definition without declaration #1

Open
oerdnj opened this issue Feb 17, 2025 · 0 comments
Open

verify_inner definition without declaration #1

oerdnj opened this issue Feb 17, 2025 · 0 comments

Comments

@oerdnj
Copy link

oerdnj commented Feb 17, 2025

When embedding into other projects and the other projects have stricter C checks, this is needed to compile the source:

diff --git a/lib/dns/hawk/hawk_vrfy.c b/lib/dns/hawk/hawk_vrfy.c
index 928e2f44823..2014720a0a0 100644
--- a/lib/dns/hawk/hawk_vrfy.c
+++ b/lib/dns/hawk/hawk_vrfy.c
@@ -2906,6 +2906,12 @@ make_t1(unsigned logn, int16_t *d, const uint8_t *h1)
  */
 TARGET_AVX2_ONLY
 int
+Zh(verify_inner)(unsigned logn,
+        const void *restrict sig, size_t sig_len,
+        const shake_context *restrict sc_data,
+        const void *restrict pub, size_t pub_len,
+        void *restrict tmp, size_t tmp_len, void *restrict ss);
+int
 Zh(verify_inner)(unsigned logn,
        const void *restrict sig, size_t sig_len,
        const shake_context *restrict sc_data,

I do understand the rational for making this non-static, but either this needs declaration first or some magic to strip the static out of the file for tests - f.e. you can include the hawk_vrfy.c file directly (with #include "hawk_vrfy.c") from the tests and you will have access to the static symbols. The local symbols will trump the global symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant