[PATCH] Update to wolfSSL 4.0
- danielinux
- Posts: 20
- Joined: Sat Nov 04, 2017 12:38 pm
- Location: Amsterdam, The Netherlands
- Has thanked: 4 times
- Been thanked: 2 times
[PATCH] Update to wolfSSL 4.0
This patch in attachment updates wolfSSL support from 3.12 to 4.0.0 stable.
Please consider for merging.
Thanks,
--
Daniele at wolfSSL dot com
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: [PATCH] Update to wolfSSL 4.0
HI,
I merged it but I am getting some warning. In addition, the previous patch contained chibios-specific patches, is this not the case for the new one?
Anyway, I merged it in trunk for you to review.
Giovanni
I merged it but I am getting some warning. In addition, the previous patch contained chibios-specific patches, is this not the case for the new one?
Code: Select all
17:02:33 **** Build of configuration Build for STM32F746-Discovery for project RT-STM32-LWIP-FATFS-USB-HTTPS ****
make -f make/stm32f746_discovery.make -j8 all
Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -ffunction-sections -fdata-sections -fno-common -flto -DWOLFSSL_USER_SETTINGS -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=./build/stm32f746_discovery/lst/ -DCORTEX_USE_FPU=FALSE -MD -MP -MF ./.dep/stm32f746_discovery/stm32f746_discovery.d -I. -I./cfg/stm32f746_discovery -I../../../os/license -I../../../os/common/portability/GCC -I../../../os/common/startup/ARMCMx/compilers/GCC -I../../../os/common/startup/ARMCMx/devices/STM32F7xx -I../../../os/common/ext/ARM/CMSIS/Core/Include -I../../../os/common/ext/ST/STM32F7xx -I../../../os/hal/include -I../../../os/hal/ports/common/ARMCMx -I../../../os/hal/ports/STM32/STM32F7xx -I../../../os/hal/ports/STM32/LLD/ADCv2 -I../../../os/hal/ports/STM32/LLD/CANv1 -I../../../os/hal/ports/STM32/LLD/CRYPv1 -I../../../os/hal/ports/STM32/LLD/DACv1 -I../../../os/hal/ports/STM32/LLD/DMAv2 -I../../../os/hal/ports/STM32/LLD/EXTIv1 -I../../../os/hal/ports/STM32/LLD/GPIOv2 -I../../../os/hal/ports/STM32/LLD/I2Cv2 -I../../../os/hal/ports/STM32/LLD/MACv1 -I../../../os/hal/ports/STM32/LLD/OTGv1 -I../../../os/hal/ports/STM32/LLD/QUADSPIv1 -I../../../os/hal/ports/STM32/LLD/RTCv2 -I../../../os/hal/ports/STM32/LLD/SPIv2 -I../../../os/hal/ports/STM32/LLD/SDMMCv1 -I../../../os/hal/ports/STM32/LLD/TIMv1 -I../../../os/hal/ports/STM32/LLD/USARTv2 -I../../../os/hal/ports/STM32/LLD/xWDGv1 -I../../../os/hal/boards/ST_STM32F746G_DISCOVERY -I../../../os/hal/osal/rt-nil -I../../../os/rt/include -I../../../os/oslib/include -I../../../os/common/ports/ARMCMx -I../../../os/common/ports/ARMCMx/compilers/GCC -I./source/ -I../../../os/hal/lib/streams -I../../../os/various/shell -I../../../os/various/lwip_bindings -I../../../ext/lwip/src/include -I../../../os/various -I../../../os/various/wolfssl_bindings -I../../../ext/wolfssl/wolfcrypt/include -I../../../ext/wolfssl/wolfssl/include -I../../../ext/wolfssl -I../../../ext/fatfs/src -I../../../test/lib -I../../../test/rt/source/test -I../../../test/oslib/source/test -I./cfg main.c -o main.o
Compiling wolfssl_chibios.c
Compiling hwrng.c
Compiling sha.c
Compiling ge_low_mem.c
Compiling compress.c
Compiling chacha20_poly1305.c
Compiling des3.c
Compiling fe_low_mem.c
Compiling hmac.c
Compiling asm.c
Compiling camellia.c
Compiling ecc.c
Compiling ecc_fp.c
Compiling ripemd.c
Compiling rsa.c
Compiling wc_port.c
Compiling arc4.c
Compiling srp.c
Compiling random.c
Compiling idea.c
Compiling blake2b.c
Compiling error.c
Compiling dh.c
Compiling asn.c
Compiling cmac.c
Compiling signature.c
Compiling pwdbased.c
Compiling chacha.c
Compiling md5.c
Compiling aes.c
Compiling wolfmath.c
Compiling memory.c
Compiling logging.c
Compiling tfm.c
Compiling coding.c
Compiling rabbit.c
Compiling pkcs12.c
Compiling md2.c
Compiling ge_operations.c
Compiling sha512.c
Compiling sha3.c
Compiling nrf51.c
Compiling pic32mz-crypt.c
Compiling atmel.c
Compiling ksdk_port.c
Compiling ti-ccm.c
Compiling ti-des3.c
Compiling ti-hash.c
Compiling ti-aes.c
Compiling armv8-aes.c
Compiling armv8-sha256.c
Compiling xil-aesgcm.c
Compiling xil-sha3.c
Compiling hash.c
Compiling curve25519.c
Compiling integer.c
Compiling wolfevent.c
Compiling dsa.c
Compiling pkcs7.c
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 'mp_exptmod_fast':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:1964:36: note: in expansion of macro 'MP_WARRAY'
if (((P->used * 2 + 1) < (int)MP_WARRAY) &&
^~~~~~~~~
../../../ext/wolfssl/wolfcrypt/src/integer.c:1965:24: warning: left shift count >= width of type [-Wshift-count-overflow]
P->used < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
^~
In file included from ../../../ext/wolfssl/wolfssl/wolfcrypt/settings.h:520,
from ../../../ext/wolfssl/wolfcrypt/src/integer.c:35:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 'fast_mp_montgomery_reduce':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../os/various/wolfssl_bindings/wolfssl_chibios.h:47:40: note: in definition of macro 'XMALLOC'
#define XMALLOC(s,h,t) chibios_alloc(h,s)
^
../../../ext/wolfssl/wolfcrypt/src/integer.c:2258:43: note: in expansion of macro 'MP_WARRAY'
W = (mp_word*)XMALLOC(sizeof(mp_word) * MP_WARRAY, NULL, DYNAMIC_TYPE_BIGINT);
^~~~~~~~~
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 'mp_montgomery_reduce':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:2409:20: note: in expansion of macro 'MP_WARRAY'
if ((digs < (int)MP_WARRAY) &&
^~~~~~~~~
../../../ext/wolfssl/wolfcrypt/src/integer.c:2411:10: warning: left shift count >= width of type [-Wshift-count-overflow]
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
^~
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 'mp_sqr':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:2811:34: note: in expansion of macro 'MP_WARRAY'
if ((a->used * 2 + 1) < (int)MP_WARRAY &&
^~~~~~~~~
../../../ext/wolfssl/wolfcrypt/src/integer.c:2813:13: warning: left shift count >= width of type [-Wshift-count-overflow]
(1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) {
^~
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 'mp_mul':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:2848:22: note: in expansion of macro 'MP_WARRAY'
if ((digs < (int)MP_WARRAY) &&
^~~~~~~~~
../../../ext/wolfssl/wolfcrypt/src/integer.c:2850:12: warning: left shift count >= width of type [-Wshift-count-overflow]
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
^~
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 'fast_s_mp_sqr':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:3046:17: note: in expansion of macro 'MP_WARRAY'
if (pa > (int)MP_WARRAY)
^~~~~~~~~
Compiling wc_encrypt.c
In file included from ../../../ext/wolfssl/wolfssl/wolfcrypt/settings.h:520,
from ../../../ext/wolfssl/wolfcrypt/src/integer.c:35:
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../os/various/wolfssl_bindings/wolfssl_chibios.h:47:40: note: in definition of macro 'XMALLOC'
#define XMALLOC(s,h,t) chibios_alloc(h,s)
^
../../../ext/wolfssl/wolfcrypt/src/integer.c:3050:45: note: in expansion of macro 'MP_WARRAY'
W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, NULL, DYNAMIC_TYPE_BIGINT);
^~~~~~~~~
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 'fast_s_mp_mul_digs':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:3165:17: note: in expansion of macro 'MP_WARRAY'
if (pa > (int)MP_WARRAY)
^~~~~~~~~
In file included from ../../../ext/wolfssl/wolfssl/wolfcrypt/settings.h:520,
from ../../../ext/wolfssl/wolfcrypt/src/integer.c:35:
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../os/various/wolfssl_bindings/wolfssl_chibios.h:47:40: note: in definition of macro 'XMALLOC'
#define XMALLOC(s,h,t) chibios_alloc(h,s)
^
../../../ext/wolfssl/wolfcrypt/src/integer.c:3169:45: note: in expansion of macro 'MP_WARRAY'
W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, NULL, DYNAMIC_TYPE_BIGINT);
^~~~~~~~~
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 's_mp_mul_digs':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
Compiling cpuid.c
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:3311:20: note: in expansion of macro 'MP_WARRAY'
if ((digs < (int)MP_WARRAY) &&
^~~~~~~~~
../../../ext/wolfssl/wolfcrypt/src/integer.c:3313:14: warning: left shift count >= width of type [-Wshift-count-overflow]
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
^~
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 's_mp_mul_high_digs':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:3819:39: note: in expansion of macro 'MP_WARRAY'
if (((a->used + b->used + 1) < (int)MP_WARRAY)
^~~~~~~~~
../../../ext/wolfssl/wolfcrypt/src/integer.c:3821:10: warning: left shift count >= width of type [-Wshift-count-overflow]
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
^~
In file included from ../../../ext/wolfssl/wolfcrypt/src/integer.c:50:
../../../ext/wolfssl/wolfcrypt/src/integer.c: In function 'fast_s_mp_mul_high_digs':
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../ext/wolfssl/wolfcrypt/src/integer.c:3898:17: note: in expansion of macro 'MP_WARRAY'
if (pa > (int)MP_WARRAY)
^~~~~~~~~
In file included from ../../../ext/wolfssl/wolfssl/wolfcrypt/settings.h:520,
from ../../../ext/wolfssl/wolfcrypt/src/integer.c:35:
../../../ext/wolfssl/wolfssl/wolfcrypt/integer.h:204:32: warning: left shift count >= width of type [-Wshift-count-overflow]
#define MP_WARRAY ((mp_word)1 << (sizeof(mp_word) * CHAR_BIT - 2 * DIGIT_BIT + 1))
^~
../../../os/various/wolfssl_bindings/wolfssl_chibios.h:47:40: note: in definition of macro 'XMALLOC'
#define XMALLOC(s,h,t) chibios_alloc(h,s)
^
../../../ext/wolfssl/wolfcrypt/src/integer.c:3902:45: note: in expansion of macro 'MP_WARRAY'
W = (mp_digit*)XMALLOC(sizeof(mp_digit) * MP_WARRAY, NULL, DYNAMIC_TYPE_BIGINT);
^~~~~~~~~
Compiling sha256.c
Compiling md4.c
Compiling fe_operations.c
Compiling ed25519.c
Compiling poly1305.c
Compiling hc128.c
Compiling internal.c
Compiling tls.c
Compiling keys.c
Compiling crl.c
Compiling ssl.c
Compiling wolfio.c
Compiling sniffer.c
Compiling ocsp.c
Compiling tls13.c
Anyway, I merged it in trunk for you to review.
Giovanni
- danielinux
- Posts: 20
- Joined: Sat Nov 04, 2017 12:38 pm
- Location: Amsterdam, The Netherlands
- Has thanked: 4 times
- Been thanked: 2 times
Re: [PATCH] Update to wolfSSL 4.0
Sorry Giovanni, I must have missed your reply back then.
The customizations required for the compatibility on our side are now part of wolfSSL codebase. (e.g. https://github.com/wolfSSL/wolfssl/blob ... ngs.h#L558).
This "reciprocal support" makes possible to drop in any new release of wolfSSL in ext/wolfssl and no modification is required in either repository.
The customizations required for the compatibility on our side are now part of wolfSSL codebase. (e.g. https://github.com/wolfSSL/wolfssl/blob ... ngs.h#L558).
This "reciprocal support" makes possible to drop in any new release of wolfSSL in ext/wolfssl and no modification is required in either repository.
Return to “Development and Feedback”
Who is online
Users browsing this forum: No registered users and 23 guests