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

Both --enable-lms and --enable-xmss? #7427

Open
iyanmv opened this issue Apr 15, 2024 · 0 comments
Open

Both --enable-lms and --enable-xmss? #7427

iyanmv opened this issue Apr 15, 2024 · 0 comments
Assignees

Comments

@iyanmv
Copy link
Contributor

iyanmv commented Apr 15, 2024

Version

5.7.0

Description

Super interesting to see experimental support for stateful hashed-based signatures. I wanted to test both but it seems like I cannot enable both at the same time, but I couldn't find any note about this in the docs.

I'm compiling with this:

prepare() {
    cd $_pkgname-$pkgver-stable
    ./autogen.sh

    # https://github.com/wolfSSL/wolfssl-examples/tree/master/pq/stateful_hash_sig
    cd ../xmss-reference
    git apply -v ../wolfssl-xmss.patch
}

build() {
    # Build XMSS library
    cd xmss-reference
    make xmss_lib.a

    # Build wolfSSL
    # cmake is currently broken: https://github.com/wolfSSL/wolfssl/issues/7425
    CFLAGS="${CFLAGS} -I/usr/include/cisco-hash-sigs"
    cd ../$_pkgname-$pkgver-stable
    ./configure --prefix=/usr \
        --enable-experimental \
        --enable-reproducible-build \
        --enable-benchmark \
        --enable-curve25519 \
        --enable-ed25519 \
        --enable-curve448 \
        --enable-ed448 \
        --enable-examples \
        --enable-crypttests \
        --enable-kyber \
        --enable-lms \
        --enable-xmss \
        --enable-dual-alg-certs \
        --with-liboqs=/usr/include \
        --with-liblms=/usr/lib \
        --with-libxmss=../xmss-reference
    make
}

And this is the error I get:

==> Starting build()...
/usr/bin/gcc -Wall -O2 -Wextra -Wpedantic   -c -o params.o params.c
/usr/bin/gcc -Wall -O2 -Wextra -Wpedantic   -c -o thash.o thash.c
/usr/bin/gcc -Wall -O2 -Wextra -Wpedantic   -c -o hash_address.o hash_address.c
/usr/bin/gcc -Wall -O2 -Wextra -Wpedantic   -c -o wots.o wots.c
/usr/bin/gcc -Wall -O2 -Wextra -Wpedantic   -c -o xmss.o xmss.c
/usr/bin/gcc -Wall -O2 -Wextra -Wpedantic   -c -o xmss_core_fast.o xmss_core_fast.c
/usr/bin/gcc -Wall -O2 -Wextra -Wpedantic   -c -o xmss_commons.o xmss_commons.c
/usr/bin/gcc -Wall -O2 -Wextra -Wpedantic   -c -o utils.o utils.c
ar rcs xmss_lib.a params.o thash.o hash_address.o wots.o xmss.o xmss_core_fast.o xmss_commons.o utils.o
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether the -Werror option is usable... yes
checking for simple visibility declarations... yes
checking size of long long... 8
checking size of long... 8
checking size of time_t... 8
checking for __uint128_t... yes
checking for arpa/inet.h... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for stddef.h... yes
checking for time.h... yes
checking for sys/ioctl.h... yes
checking for sys/socket.h... yes
checking for sys/time.h... yes
checking for errno.h... yes
checking for sys/un.h... yes
checking for socket in -lnetwork... no
checking whether byte ordering is bigendian... no
checking for __atomic... yes
checking for stdatomic.h... yes
checking for gethostbyname... yes
checking for getaddrinfo... yes
checking for gettimeofday... yes
checking for gmtime_r... yes
checking for gmtime_s... no
checking for inet_ntoa... yes
checking for memset... yes
checking for socket... yes
checking for strftime... yes
checking for atexit... yes
checking for gcc options needed to detect all undeclared functions... none needed
checking whether gethostbyname is declared... yes
checking whether getaddrinfo is declared... yes
checking whether gettimeofday is declared... yes
checking whether gmtime_r is declared... yes
checking whether gmtime_s is declared... no
checking whether inet_ntoa is declared... yes
checking whether memset is declared... yes
checking whether socket is declared... yes
checking whether strftime is declared... yes
checking whether atexit is declared... yes
checking for size_t... yes
checking for uint8_t... yes
checking for uintptr_t... yes
checking dependency style of gcc... gcc3
checking for thread local storage (TLS) class... _Thread_local
checking for debug... no
checking for liboqs... yes
checking for libxmss... yes
checking for liblms... yes
checking how to run the C preprocessor... gcc -E
checking for egrep -e... (cached) /usr/bin/grep -E
checking whether gcc is Clang... no
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for cos in -lm... yes
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for vcs system... none
checking for vcs checkout... no
checking whether the linker accepts -Werror... yes
checking whether the linker accepts -z relro -z now... yes
checking whether the linker accepts -pie... yes
checking whether C compiler accepts -Werror... yes
checking whether C compiler accepts -Wno-pragmas... yes
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -Wunknown-pragmas... yes
checking whether C compiler accepts -Wthis-test-should-fail... no
checking whether C compiler accepts --param=ssp-buffer-size=1... yes
checking whether C compiler accepts -Waddress... yes
checking whether C compiler accepts -Warray-bounds... yes
checking whether C compiler accepts -Wbad-function-cast... yes
checking whether C compiler accepts -Wchar-subscripts... yes
checking whether C compiler accepts -Wcomment... yes
checking whether C compiler accepts -Wfloat-equal... yes
checking whether C compiler accepts -Wformat-security... yes
checking whether C compiler accepts -Wformat=2... yes
checking whether C compiler accepts -Wmaybe-uninitialized... yes
checking whether C compiler accepts -Wmissing-field-initializers... yes
checking whether C compiler accepts -Wmissing-noreturn... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wnested-externs... yes
checking whether C compiler accepts -Wnormalized=id... yes
checking whether C compiler accepts -Woverride-init... yes
checking whether C compiler accepts -Wpointer-arith... yes
checking whether C compiler accepts -Wpointer-sign... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Wshorten-64-to-32... no
checking whether C compiler accepts -Wsign-compare... yes
checking whether C compiler accepts -Wstrict-overflow=1... yes
checking whether C compiler accepts -Wstrict-prototypes... yes
checking whether C compiler accepts -Wswitch-enum... yes
checking whether C compiler accepts -Wundef... yes
checking whether C compiler accepts -Wunused... yes
checking whether C compiler accepts -Wunused-result... yes
checking whether C compiler accepts -Wunused-variable... yes
checking whether C compiler accepts -Wwrite-strings... yes
checking whether C compiler accepts -fwrapv... yes
creating wolfssl-config - generic 5.7.0 for -lwolfssl -loqs -lpthread
checking the number of available CPUs... 8
configure: adding automake macro support
configure: creating aminclude.am
configure: added jobserver support to make for 9 jobs
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating stamp-h
config.status: creating Makefile
config.status: creating wolfssl/version.h
config.status: creating wolfssl/options.h
config.status: creating support/wolfssl.pc
config.status: creating debian/control
config.status: creating debian/changelog
config.status: creating rpm/spec
config.status: creating wolfcrypt/test/test_paths.h
config.status: creating scripts/unit.test
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing wolfssl/wolfcrypt/async.h commands
config.status: executing wolfssl/wolfcrypt/fips.h commands
config.status: executing wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h commands
config.status: executing wolfssl/wolfcrypt/port/intel/quickassist.h commands
config.status: executing wolfssl/wolfcrypt/port/intel/quickassist_mem.h commands
configure: ---
configure: Running make clean...
configure: ---
configure: Generating user options header...
---
Configuration summary for wolfssl version 5.7.0

   * Installation prefix:        /usr
   * System type:                pc-linux-gnu
   * Host CPU:                   x86_64
   * C Compiler:                 gcc
   * C Flags:                    -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -I/usr/include/cisco-hash-sigs   -Wno-pragmas -Wall -Wextra -Wunknown-pragmas --param=ssp-buffer-size=1 -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmaybe-uninitialized -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=id -Woverride-init -Wpointer-arith -Wpointer-sign -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv
   * C++ Compiler:               
   * C++ Flags:                  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto
   * CPP Flags:                   -DWOLFSSL_HAVE_ATOMIC_H -DHAVE_LIBXMSS -I../xmss-reference -DHAVE_LIBLMS -I/usr/lib
   * CCAS Flags:                 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -I/usr/include/cisco-hash-sigs  
   * LD Flags:                   -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto
   * LIB Flags:                   -pie -z relro -z now 
   * Library Suffix:             
   * Debug enabled:              no
   * Coverage enabled:           
   * Warnings as failure:        no
   * make -j:                    9
   * VCS checkout:               no

   Features 
   * Experimental settings:      Allowed
   * FIPS:                       no
   * Single threaded:            no
   * Filesystem:                 yes
   * OpenSSH Build:              no
   * OpenSSL Extra API:          no
   * OpenSSL Coexist:            no
   * Old Names:                  yes
   * Max Strength Build:         no
   * Distro Build:               no
   * Reproducible Build:         yes
   * Side-channel Hardening:     yes
   * Single Precision Math:      no
   * SP implementation:          all
   * Fast Math:                  no
   * Heap Math:                  no
   * Assembly Allowed:           yes
   * sniffer:                    no
   * snifftest:                  no
   * ARC4:                       no
   * AES:                        yes
   * AES-NI:                     no
   * AES-CBC:                    yes
   * AES-CBC length checks:      no
   * AES-GCM:                    yes
   * AES-GCM streaming:          no
   * AES-CCM:                    no
   * AES-CTR:                    no
   * AES-CFB:                    no
   * AES-OFB:                    no
   * AES-XTS:                    no
   * AES-SIV:                    no
   * AES-EAX:                    no
   * AES Bitspliced:             no
   * ARIA:                       no
   * DES3:                       no
   * Camellia:                   no
   * SM4-ECB:                    no
   * SM4-CBC:                    no
   * SM4-CTR:                    no
   * SM4-GCM:                    no
   * SM4-CCM:                    no
   * NULL Cipher:                no
   * MD2:                        no
   * MD4:                        no
   * MD5:                        yes
   * RIPEMD:                     no
   * SHA:                        yes
   * SHA-224:                    yes
   * SHA-384:                    yes
   * SHA-512:                    yes
   * SHA3:                       yes
   * SHAKE128:                   no
   * SHAKE256:                   yes
   * SM3:                        no
   * BLAKE2:                     no
   * BLAKE2S:                    no
   * SipHash:                    no
   * CMAC:                       no
   * keygen:                     no
   * certgen:                    no
   * certreq:                    no
   * certext:                    no
   * certgencache:               no
   * CHACHA:                     yes
   * XCHACHA:                    no
   * Hash DRBG:                  yes
   * MmemUse Entropy:            no
   * PWDBASED:                   yes
   * Encrypted keys:             no
   * scrypt:                     no
   * wolfCrypt Only:             no
   * HKDF:                       yes
   * HPKE:                       no
   * X9.63 KDF:                  no
   * SRTP-KDF:                   no
   * PSK:                        no
   * Poly1305:                   yes
   * LEANPSK:                    no
   * LEANTLS:                    no
   * RSA:                        yes
   * RSA-PSS:                    yes
   * DSA:                        no
   * DH:                         yes
   * DH Default Parameters:      yes
   * ECC:                        yes
   * ECC Custom Curves:          no
   * ECC Minimum Bits:           224
   * FPECC:                      no
   * ECC_ENCRYPT:                no
   * Brainpool:                  no
   * SM2:                        no
   * CURVE25519:                 yes
   * ED25519:                    yes
   * ED25519 streaming:          no
   * CURVE448:                   yes
   * ED448:                      yes
   * ED448 streaming:            no
   * LMS:                        yes
   * LMS wolfSSL impl:           no
   * XMSS:                       yes
   * XMSS wolfSSL impl:          no
   * XMSS_ROOT:                  ../xmss-reference
   * KYBER:                      yes
   * KYBER wolfSSL impl:         no
   * ECCSI                       no
   * SAKKE                       no
   * ASN:                        yes
   * Anonymous cipher:           no
   * CODING:                     yes
   * MEMORY:                     yes
   * I/O POOL:                   no
   * wolfSentry:                 no
   * LIGHTY:                     no
   * WPA Supplicant:             no
   * HAPROXY:                    no
   * STUNNEL:                    no
   * tcpdump:                    no
   * libssh2:                    no
   * ntp:                        no
   * rsyslog:                    no
   * Apache httpd:               no
   * NGINX:                      no
   * OpenResty:                  no
   * ASIO:                       no
   * LIBWEBSOCKETS:              no
   * Qt:                         no
   * Qt Unit Testing:            no
   * SIGNAL:                     no
   * chrony:                     no
   * strongSwan:                 no
   * OpenLDAP:                   no
   * hitch:                      no
   * memcached:                  no
   * ERROR_STRINGS:              yes
   * DTLS:                       no
   * DTLS v1.3:                  no
   * SCTP:                       no
   * SRTP:                       no
   * Indefinite Length:          no
   * Multicast:                  no
   * SSL v3.0 (Old):             no
   * TLS v1.0 (Old):             no
   * TLS v1.1 (Old):             no
   * TLS v1.2:                   yes
   * TLS v1.3:                   yes
   * Post-handshake Auth:        no
   * Early Data:                 no
   * QUIC:                       no
   * Send State in HRR Cookie:   undefined
   * OCSP:                       no
   * OCSP Stapling:              no
   * OCSP Stapling v2:           no
   * CRL:                        no
   * CRL-MONITOR:                no
   * Persistent session cache:   no
   * Persistent cert    cache:   no
   * Atomic User Record Layer:   no
   * Public Key Callbacks:       no
   * libxmss:                    yes
   * liblms:                     yes
   * liboqs:                     yes
   * Whitewood netRandom:        no
   * Server Name Indication:     yes
   * ALPN:                       no
   * Maximum Fragment Length:    no
   * Trusted CA Indication:      no
   * Truncated HMAC:             no
   * Supported Elliptic Curves:  yes
   * FFDHE only in client:       no
   * Session Ticket:             no
   * Extended Master Secret:     yes
   * Renegotiation Indication:   no
   * Secure Renegotiation:       no
   * Fallback SCSV:              no
   * Keying Material Exporter:   no
   * All TLS Extensions:         no
   * S/MIME:                     no
   * PKCS#7:                     no
   * PKCS#8:                     yes
   * PKCS#11:                    no
   * PKCS#12:                    yes
   * wolfSSH:                    no
   * wolfEngine:                 no
   * wolfTPM:                    no
   * wolfCLU:                    no
   * wolfSCEP:                   no
   * Secure Remote Password:     no
   * Small Stack:                no
   * Linux Kernel Module:        no
   * valgrind unit tests:        no
   * LIBZ:                       no
   * Examples:                   yes
   * Crypt tests:                yes
   * Stack sizes in tests:       no
   * Heap stats in tests:        no
   * Asynchronous Crypto:        no
   * Asynchronous Crypto (sim):  no
   * Cavium Nitrox:              no
   * Cavium Octeon (Sync):       no
   * Intel Quick Assist:         no
   * ARM ASM:                    no
   * ARM ASM SHA512/SHA3 Crypto  no
   * ARM ASM SM3/SM4 Crypto      no
   * AES Key Wrap:               no
   * Write duplicate:            no
   * Xilinx Hardware Acc.:       no
   * Inline Code:                yes
   * Linux AF_ALG:               no
   * Linux KCAPI:                no
   * Linux devcrypto:            no
   * PK callbacks:               no
   * Crypto callbacks:           no
   * i.MX CAAM:                  no
   * IoT-Safe:                   no
   * IoT-Safe HWRNG:             no
   * NXP SE050:                  no
   * Maxim Integrated MAXQ10XX:  no
   * PSA:                        no
   * System CA certs:            yes
   * Dual alg cert support:      yes
   * ERR Queues per Thread:      yes
   * rwlock:                     no
   * keylog export:              no
   * AutoSAR :                   no

---
./configure flags: --prefix=/usr --enable-experimental --enable-reproducible-build --enable-benchmark --enable-curve25519 --enable-ed25519 --enable-curve448 --enable-ed448 --enable-examples --enable-crypttests --enable-kyber --enable-lms --enable-xmss --enable-dual-alg-certs --with-liboqs=/usr/include --with-liblms=/usr/lib --with-libxmss=../xmss-reference 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -I/usr/include/cisco-hash-sigs' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto'
make -j9  all-recursive
make[1]: Entering directory '/build/wolfssl-liboqs/src/wolfssl-5.7.0-stable'
make[1]: warning: -j9 forced in submake: resetting jobserver mode.
make[2]: Entering directory '/build/wolfssl-liboqs/src/wolfssl-5.7.0-stable'
make[2]: warning: -j9 forced in submake: resetting jobserver mode.
  CC       wolfcrypt/test/testsuite_testsuite_test-test.o
  CC       examples/client/testsuite_testsuite_test-client.o
  CC       examples/echoclient/testsuite_testsuite_test-echoclient.o
  CC       examples/echoserver/testsuite_testsuite_test-echoserver.o
  CC       examples/server/testsuite_testsuite_test-server.o
  CC       examples/client/tests_unit_test-client.o
  CC       examples/server/tests_unit_test-server.o
  CC       wolfcrypt/benchmark/benchmark.o
  CC       wolfcrypt/src/src_libwolfssl_la-hmac.lo
In file included from wolfcrypt/test/test.c:325:
./wolfssl/wolfcrypt/lms.h:37:15: error: conflicting types for ‘write_private_key_cb’; have ‘int (*)(const byte *, word32,  void *)’ {aka ‘int (*)(const unsigned char *, unsigned int,  void *)’}
   37 | typedef int (*write_private_key_cb)(const byte * priv, word32 privSz, void *context);
      |               ^~~~~~~~~~~~~~~~~~~~
In file included from wolfcrypt/test/test.c:317:
./wolfssl/wolfcrypt/xmss.h:163:26: note: previous declaration of ‘write_private_key_cb’ with type ‘write_private_key_cb’ {aka ‘enum wc_XmssRc (*)(const unsigned char *, unsigned int,  void *)’}
  163 | typedef enum wc_XmssRc (*write_private_key_cb)(const byte* priv, word32 privSz,
      |                          ^~~~~~~~~~~~~~~~~~~~
./wolfssl/wolfcrypt/lms.h:38:15: error: conflicting types for ‘read_private_key_cb’; have ‘int (*)(byte *, word32,  void *)’ {aka ‘int (*)(unsigned char *, unsigned int,  void *)’}
   38 | typedef int (*read_private_key_cb)(byte * priv, word32 privSz, void *context);
      |               ^~~~~~~~~~~~~~~~~~~
./wolfssl/wolfcrypt/xmss.h:165:26: note: previous declaration of ‘read_private_key_cb’ with type ‘read_private_key_cb’ {aka ‘enum wc_XmssRc (*)(unsigned char *, unsigned int,  void *)’}
  165 | typedef enum wc_XmssRc (*read_private_key_cb)(byte* priv, word32 privSz,
      |                          ^~~~~~~~~~~~~~~~~~~
In file included from wolfcrypt/benchmark/benchmark.c:186:
./wolfssl/wolfcrypt/xmss.h:163:26: error: conflicting types for ‘write_private_key_cb’; have ‘enum wc_XmssRc (*)(const byte *, word32,  void *)’ {aka ‘enum wc_XmssRc (*)(const unsigned char *, unsigned int,  void *)’}
  163 | typedef enum wc_XmssRc (*write_private_key_cb)(const byte* priv, word32 privSz,
      |                          ^~~~~~~~~~~~~~~~~~~~
In file included from wolfcrypt/benchmark/benchmark.c:178:
./wolfssl/wolfcrypt/lms.h:37:15: note: previous declaration of ‘write_private_key_cb’ with type ‘write_private_key_cb’ {aka ‘int (*)(const unsigned char *, unsigned int,  void *)’}
   37 | typedef int (*write_private_key_cb)(const byte * priv, word32 privSz, void *context);
      |               ^~~~~~~~~~~~~~~~~~~~
./wolfssl/wolfcrypt/xmss.h:165:26: error: conflicting types for ‘read_private_key_cb’; have ‘enum wc_XmssRc (*)(byte *, word32,  void *)’ {aka ‘enum wc_XmssRc (*)(unsigned char *, unsigned int,  void *)’}
  165 | typedef enum wc_XmssRc (*read_private_key_cb)(byte* priv, word32 privSz,
      |                          ^~~~~~~~~~~~~~~~~~~
./wolfssl/wolfcrypt/lms.h:38:15: note: previous declaration of ‘read_private_key_cb’ with type ‘read_private_key_cb’ {aka ‘int (*)(unsigned char *, unsigned int,  void *)’}
   38 | typedef int (*read_private_key_cb)(byte * priv, word32 privSz, void *context);
      |               ^~~~~~~~~~~~~~~~~~~
  CC       wolfcrypt/src/src_libwolfssl_la-hash.lo
  CC       wolfcrypt/src/src_libwolfssl_la-cpuid.lo
  CC       wolfcrypt/src/src_libwolfssl_la-kdf.lo
  CC       wolfcrypt/src/src_libwolfssl_la-random.lo
make[2]: *** [Makefile:6490: wolfcrypt/benchmark/benchmark.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC       wolfcrypt/src/src_libwolfssl_la-sha256.lo
make[2]: *** [Makefile:7942: wolfcrypt/test/testsuite_testsuite_test-test.o] Error 1
make[2]: Leaving directory '/build/wolfssl-liboqs/src/wolfssl-5.7.0-stable'
make[1]: *** [Makefile:8182: all-recursive] Error 1
make[1]: Leaving directory '/build/wolfssl-liboqs/src/wolfssl-5.7.0-stable'
make: *** [Makefile:4839: all] Error 2

Removing either --enable-lms or --enable-xmss fixes the problem.

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

2 participants