wolfSSL / wolfssl

The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
https://www.wolfssl.com
GNU General Public License v2.0
2.36k stars 834 forks source link

Fix issue with error: conflicting types for 'BlockSha3' #8123

Closed dgarske closed 3 weeks ago

dgarske commented 3 weeks ago

Description

[CC-AARCH64] lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.o
lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.c:212:6: error: conflicting types for 'BlockSha3'; have 'void(long unsigned int *)'
  212 | void BlockSha3(unsigned long* state)
      |      ^~~~~~~~~
In file included from lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.c:35:
lib/wolfssl/wolfssl/wolfcrypt/sha3.h:224:20: note: previous declaration of 'BlockSha3' with type 'void(word64 *)' {aka 'void(long long unsigned int *)'}
  224 | WOLFSSL_LOCAL void BlockSha3(word64 *s);
      |                    ^~~~~~~~~

Testing

wolfBoot cp ./config/examples/zynqmp.config .config

Checklist

dgarske commented 3 weeks ago

@SparkiDev , is there a reason we don't include #include <stdint.h> at the top of these arm asm files? For example they use uint64_t and wolfSSL headers do not explicitly include it. In wolfBoot I had to add to the user_settings.h to get it to build.

SparkiDev commented 3 weeks ago

We shouldn't be using uint64_t. These need to change to word64.

dgarske commented 3 weeks ago

Retest this please: Unit.test for 'PRB-dtls.txt_27'