Adapt the _ALT style to our new standard
- in .h files: only put the context declaration inside the #ifdef _ALT
(this was changed in 2.9.0, ie after the original PR)
- in .c file: only leave selftest out of _ALT: even though some function are
trivial to build from other parts, alt implementors might want to go another
way about them (for efficiency or other reasons)
diff --git a/library/poly1305.c b/library/poly1305.c
index 842a4d4..6acbc7f 100644
--- a/library/poly1305.c
+++ b/library/poly1305.c
@@ -390,8 +390,6 @@
return( 0 );
}
-#endif /* MBEDTLS_POLY1305_ALT */
-
int mbedtls_poly1305_mac( const unsigned char key[32],
size_t ilen,
const unsigned char *input,
@@ -417,6 +415,8 @@
return( 0 );
}
+#endif /* MBEDTLS_POLY1305_ALT */
+
#if defined(MBEDTLS_SELF_TEST)
static const unsigned char test_keys[2][32] =