mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-11 06:31:19 +02:00
fe_operations: declare asm curve25519_base to fix strict-C build
curve25519.c calls curve25519_base() on the CURVED25519_X64 / aarch64 ARMASM path, but the function is only defined in assembly and had no C prototype in any header, so a strict C compiler (implicit-declaration as error) failed to build that configuration. Declare it alongside the sibling curve25519() prototype under the same guard.
This commit is contained in:
@@ -112,6 +112,13 @@ WOLFSSL_LOCAL int curve25519_nb(byte * q, const byte * n, const byte * p,
|
||||
WOLFSSL_LOCAL void fe_init(void);
|
||||
|
||||
WOLFSSL_LOCAL int curve25519(byte * q, const byte * n, const byte * p);
|
||||
#if defined(CURVED25519_X64) || (defined(WOLFSSL_ARMASM) && defined(__aarch64__))
|
||||
/* Fixed-base scalar multiply provided by the x64/aarch64 assembly
|
||||
* (fe_x25519_asm.S, armv8-curve25519); declared here as no other header
|
||||
* prototypes it, which otherwise breaks a strict C (implicit-declaration)
|
||||
* build of curve25519.c. */
|
||||
WOLFSSL_LOCAL int curve25519_base(byte * q, const byte * n);
|
||||
#endif
|
||||
#ifdef WOLFSSL_CURVE25519_BLINDING
|
||||
WOLFSSL_LOCAL int curve25519_blind(byte* q, const byte* n, const byte* mask,
|
||||
const byte* p, const byte* rz);
|
||||
|
||||
Reference in New Issue
Block a user