├── .gitignore ├── Middlewares └── Third_Party │ ├── WolfSSL │ ├── wolfcrypt │ │ ├── src │ │ │ ├── async.c │ │ │ ├── fips.c │ │ │ ├── fips_test.c │ │ │ ├── selftest.c │ │ │ ├── wolfcrypt_first.c │ │ │ ├── wolfcrypt_last.c │ │ │ ├── port │ │ │ │ ├── cavium │ │ │ │ │ ├── cavium_nitrox.c │ │ │ │ │ ├── README.md │ │ │ │ │ └── README_Octeon.md │ │ │ │ ├── intel │ │ │ │ │ ├── quickassist.c │ │ │ │ │ ├── quickassist_mem.c │ │ │ │ │ └── README.md │ │ │ │ ├── caam │ │ │ │ │ └── caam_doc.pdf │ │ │ │ ├── devcrypto │ │ │ │ │ └── README.md │ │ │ │ └── Espressif │ │ │ │ │ └── esp32_util.c │ │ │ ├── ecc_fp.c │ │ │ ├── fp_mul_comba_3.i │ │ │ ├── fp_sqr_comba_3.i │ │ │ ├── fp_sqr_comba_4.i │ │ │ └── fp_mul_comba_4.i │ │ ├── user-crypto │ │ │ ├── lib │ │ │ │ └── .gitkeep │ │ │ ├── Makefile.am │ │ │ ├── include.am │ │ │ ├── autogen.sh │ │ │ └── configure.ac │ │ ├── benchmark │ │ │ └── include.am │ │ └── test │ │ │ ├── include.am │ │ │ ├── test.h │ │ │ └── README.md │ ├── wolfssl │ │ ├── wolfcrypt │ │ │ ├── async.h │ │ │ ├── fips.h │ │ │ ├── port │ │ │ │ ├── cavium │ │ │ │ │ ├── cavium_nitrox.h │ │ │ │ │ └── cavium_octeon_sync.h │ │ │ │ ├── intel │ │ │ │ │ ├── quickassist.h │ │ │ │ │ ├── quickassist_mem.h │ │ │ │ │ └── quickassist_sync.h │ │ │ │ ├── xilinx │ │ │ │ │ └── xil-sha3.h │ │ │ │ ├── nrf51.h │ │ │ │ ├── ti │ │ │ │ │ ├── ti-ccm.h │ │ │ │ │ └── ti-hash.h │ │ │ │ ├── af_alg │ │ │ │ │ ├── afalg_hash.h │ │ │ │ │ └── wc_afalg.h │ │ │ │ ├── devcrypto │ │ │ │ │ └── wc_devcrypto.h │ │ │ │ └── caam │ │ │ │ │ ├── wolfcaam.h │ │ │ │ │ └── wolfcaam_sha.h │ │ │ ├── selftest.h │ │ │ ├── compress.h │ │ │ ├── fips_test.h │ │ │ ├── md2.h │ │ │ ├── md4.h │ │ │ ├── arc4.h │ │ │ ├── rabbit.h │ │ │ ├── ripemd.h │ │ │ ├── hc128.h │ │ │ ├── cpuid.h │ │ │ ├── pkcs12.h │ │ │ ├── chacha.h │ │ │ └── idea.h │ │ ├── openssl │ │ │ ├── ssl23.h │ │ │ ├── ui.h │ │ │ ├── lhash.h │ │ │ ├── opensslconf.h │ │ │ ├── engine.h │ │ │ ├── x509.h │ │ │ ├── rand.h │ │ │ ├── asn1t.h │ │ │ ├── ossl_typ.h │ │ │ ├── conf.h │ │ │ ├── tls1.h │ │ │ ├── x509_vfy.h │ │ │ ├── ec448.h │ │ │ ├── buffer.h │ │ │ ├── ec25519.h │ │ │ ├── obj_mac.h │ │ │ ├── ed448.h │ │ │ ├── opensslv.h │ │ │ ├── ecdh.h │ │ │ ├── ed25519.h │ │ │ ├── pkcs12.h │ │ │ ├── md4.h │ │ │ ├── ripemd.h │ │ │ ├── rc4.h │ │ │ ├── objects.h │ │ │ ├── err.h │ │ │ ├── stack.h │ │ │ ├── md5.h │ │ │ └── include.am │ │ ├── include.am │ │ ├── options.h │ │ ├── options.h.in │ │ ├── version.h │ │ ├── version.h.in │ │ └── crl.h │ └── user_settings.h │ ├── FreeRTOS │ └── Source │ │ └── CMSIS_RTOS │ │ ├── cmsis_os.c │ │ └── cmsis_os.h │ └── LwIP │ ├── src │ ├── include │ │ ├── netif │ │ │ ├── etharp.h │ │ │ └── ppp │ │ │ │ ├── chap-md5.h │ │ │ │ ├── chap_ms.h │ │ │ │ └── ecp.h │ │ ├── lwip │ │ │ ├── apps │ │ │ │ ├── snmp_snmpv2_usm.h │ │ │ │ ├── snmp_snmpv2_framework.h │ │ │ │ ├── netbiosns.h │ │ │ │ ├── smtp_opts.h │ │ │ │ └── netbiosns_opts.h │ │ │ ├── prot │ │ │ │ ├── ip.h │ │ │ │ ├── udp.h │ │ │ │ └── mld6.h │ │ │ ├── ethip6.h │ │ │ └── if_api.h │ │ └── compat │ │ │ ├── posix │ │ │ ├── netdb.h │ │ │ ├── arpa │ │ │ │ └── inet.h │ │ │ ├── sys │ │ │ │ └── socket.h │ │ │ └── net │ │ │ │ └── if.h │ │ │ └── stdc │ │ │ └── errno.h │ ├── core │ │ └── ipv6 │ │ │ └── inet6.c │ └── netif │ │ └── ppp │ │ ├── eui64.c │ │ └── pppcrypt.c │ └── system │ └── arch │ ├── bpstruct.h │ ├── epstruct.h │ ├── lib.h │ ├── cpu.h │ ├── perf.h │ ├── init.h │ └── sys_arch.h ├── LWIP ├── App │ ├── lwip.c │ └── lwip.h └── Target │ └── ethernetif.h ├── Drivers └── CMSIS │ ├── Device │ └── ST │ │ └── STM32F7xx │ │ └── Include │ │ ├── stm32f7xx.h │ │ └── stm32f767xx.h │ └── Include │ └── cmsis_version.h ├── MDK-ARM ├── EventRecorderStub.scvd ├── RTE │ └── _HTTPS_Demo │ │ └── RTE_Components.h └── JLinkSettings.ini ├── Bsp ├── bsp_wolfssl.h ├── bsp_dhcp.h ├── bsp_printlog.h ├── bsp_printlog.c ├── bsp_sntp.h └── bsp_dhcp.c └── Core ├── Inc ├── gpio.h ├── rng.h ├── rtc.h ├── fmc.h ├── stm32f7xx_it.h └── main.h └── Src ├── rng.c ├── rtc.c └── stm32f7xx_hal_msp.c /.gitignore: -------------------------------------------------------------------------------- 1 | MDK-ARM/HTTPS_Demo/ 2 | *.PeterH 3 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/async.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/fips.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/fips_test.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/selftest.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/async.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/fips.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/wolfcrypt_first.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/wolfcrypt_last.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/user-crypto/lib/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/cavium/cavium_nitrox.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/intel/quickassist.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/intel/quickassist_mem.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/intel/quickassist.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/intel/quickassist_mem.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/ecc_fp.c: -------------------------------------------------------------------------------- 1 | /* dummy ecc_fp.c for dist */ 2 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ssl23.h: -------------------------------------------------------------------------------- 1 | /* ssl23.h for openssl */ 2 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ui.h: -------------------------------------------------------------------------------- 1 | /* ui.h for openssl */ 2 | 3 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/lhash.h: -------------------------------------------------------------------------------- 1 | /* lhash.h for openSSL */ 2 | 3 | -------------------------------------------------------------------------------- /LWIP/App/lwip.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterH0323/STM32_HTTPs_WolfSSL/HEAD/LWIP/App/lwip.c -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/user_settings.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterH0323/STM32_HTTPs_WolfSSL/HEAD/Middlewares/Third_Party/WolfSSL/user_settings.h -------------------------------------------------------------------------------- /Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterH0323/STM32_HTTPs_WolfSSL/HEAD/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h -------------------------------------------------------------------------------- /Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f767xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterH0323/STM32_HTTPs_WolfSSL/HEAD/Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f767xx.h -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/cavium/README.md: -------------------------------------------------------------------------------- 1 | # Cavium Nitrox III/V Support 2 | 3 | Please contact wolfSSL at info@wolfssl.com to request an evaluation. 4 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/cavium/README_Octeon.md: -------------------------------------------------------------------------------- 1 | # Cavium Octeon III CN7300 2 | 3 | Please contact wolfSSL at info@wolfssl.com to request an evaluation. 4 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterH0323/STM32_HTTPs_WolfSSL/HEAD/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c -------------------------------------------------------------------------------- /Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterH0323/STM32_HTTPs_WolfSSL/HEAD/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/opensslconf.h: -------------------------------------------------------------------------------- 1 | /* opensslconf.h for openSSL */ 2 | 3 | 4 | #ifndef OPENSSL_THREADS 5 | #define OPENSSL_THREADS 6 | #endif 7 | 8 | 9 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/intel/README.md: -------------------------------------------------------------------------------- 1 | # Intel QuickAssist Adapter Asynchronous Support 2 | 3 | Please contact wolfSSL at info@wolfssl.com to request an evaluation. 4 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/caam/caam_doc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeterH0323/STM32_HTTPs_WolfSSL/HEAD/Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/caam/caam_doc.pdf -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/netif/etharp.h: -------------------------------------------------------------------------------- 1 | /* ARP has been moved to core/ipv4, provide this #include for compatibility only */ 2 | #include "lwip/etharp.h" 3 | #include "netif/ethernet.h" 4 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/engine.h: -------------------------------------------------------------------------------- 1 | /* engine.h for libcurl */ 2 | 3 | #include 4 | 5 | #undef HAVE_OPENSSL_ENGINE_H 6 | 7 | #define ENGINE_load_builtin_engines() /*ENGINE_load_builtin_engines not needed*/ 8 | 9 | -------------------------------------------------------------------------------- /MDK-ARM/EventRecorderStub.scvd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/user-crypto/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS=-I m4 2 | 3 | #add in wolfssl directory 4 | AM_CPPFLAGS+=-I$(abs_srcdir)/../../ -I$(srcdir)/include/ 5 | lib_LTLIBRARIES = lib/libusercrypto.la 6 | lib_libusercrypto_la_CPPFLAGS = $(AM_CPPFLAGS) 7 | lib_libusercrypto_la_LDFLAGS = $(AM_LDFLAGS) 8 | lib_libusercrypto_la_SOURCES = src/rsa.c 9 | include_HEADERS = include/user_rsa.h 10 | -------------------------------------------------------------------------------- /MDK-ARM/RTE/_HTTPS_Demo/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'HTTPS_Demo' 7 | * Target: 'HTTPS_Demo' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "stm32f7xx.h" 18 | 19 | 20 | 21 | #endif /* RTE_COMPONENTS_H */ 22 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/user-crypto/include.am: -------------------------------------------------------------------------------- 1 | 2 | if BUILD_FAST_RSA 3 | include_HEADERS += wolfcrypt/user-crypto/include/user_rsa.h 4 | endif 5 | 6 | # user crypto plug in example 7 | EXTRA_DIST+= wolfcrypt/user-crypto/configure.ac 8 | EXTRA_DIST+= wolfcrypt/user-crypto/autogen.sh 9 | EXTRA_DIST+= wolfcrypt/user-crypto/include/user_rsa.h 10 | EXTRA_DIST+= wolfcrypt/user-crypto/src/rsa.c 11 | EXTRA_DIST+= wolfcrypt/user-crypto/lib/.gitkeep 12 | EXTRA_DIST+= wolfcrypt/user-crypto/README.txt 13 | EXTRA_DIST+= wolfcrypt/user-crypto/Makefile.am 14 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_snmpv2_usm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by LwipMibCompiler 3 | */ 4 | 5 | #ifndef LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H 6 | #define LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H 7 | 8 | #include "lwip/apps/snmp_opts.h" 9 | #if LWIP_SNMP 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif /* __cplusplus */ 14 | 15 | #include "lwip/apps/snmp_core.h" 16 | 17 | extern const struct snmp_mib snmpusmmib; 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif /* __cplusplus */ 22 | 23 | #endif /* LWIP_SNMP */ 24 | #endif /* LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H */ 25 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/user-crypto/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Create configure and makefile stuff... 4 | # 5 | 6 | # Git hooks should come before autoreconf. 7 | if test -d .git; then 8 | if ! test -d .git/hooks; then 9 | mkdir .git/hooks 10 | fi 11 | ln -s -f ../../pre-commit.sh .git/hooks/pre-commit 12 | ln -s -f ../../pre-push.sh .git/hooks/pre-push 13 | fi 14 | 15 | # If this is a source checkout then call autoreconf with error as well 16 | if test -d .git; then 17 | WARNINGS="all,error" 18 | else 19 | WARNINGS="all" 20 | fi 21 | 22 | autoreconf --install --force --verbose 23 | 24 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/benchmark/include.am: -------------------------------------------------------------------------------- 1 | # vim:ft=automake 2 | # All paths should be given relative to the root 3 | 4 | if BUILD_WOLFCRYPT_TESTS 5 | noinst_PROGRAMS += wolfcrypt/benchmark/benchmark 6 | wolfcrypt_benchmark_benchmark_SOURCES = wolfcrypt/benchmark/benchmark.c 7 | wolfcrypt_benchmark_benchmark_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD) 8 | wolfcrypt_benchmark_benchmark_DEPENDENCIES = src/libwolfssl.la 9 | noinst_HEADERS += wolfcrypt/benchmark/benchmark.h 10 | endif 11 | EXTRA_DIST += wolfcrypt/benchmark/benchmark.sln 12 | EXTRA_DIST += wolfcrypt/benchmark/benchmark.vcproj 13 | EXTRA_DIST += wolfcrypt/benchmark/README.md 14 | DISTCLEANFILES+= wolfcrypt/benchmark/.libs/benchmark 15 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/test/include.am: -------------------------------------------------------------------------------- 1 | # vim:ft=automake 2 | # All paths should be given relative to the root 3 | 4 | if BUILD_WOLFCRYPT_TESTS 5 | noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt 6 | if BUILD_CRYPTONLY 7 | check_PROGRAMS+= wolfcrypt/test/testwolfcrypt 8 | endif 9 | noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt 10 | wolfcrypt_test_testwolfcrypt_SOURCES = wolfcrypt/test/test.c 11 | wolfcrypt_test_testwolfcrypt_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD) 12 | wolfcrypt_test_testwolfcrypt_DEPENDENCIES = src/libwolfssl.la 13 | noinst_HEADERS += wolfcrypt/test/test.h 14 | endif 15 | EXTRA_DIST += wolfcrypt/test/test.sln 16 | EXTRA_DIST += wolfcrypt/test/test.vcproj 17 | EXTRA_DIST += wolfcrypt/test/README.md 18 | DISTCLEANFILES+= wolfcrypt/test/.libs/testwolfcrypt 19 | -------------------------------------------------------------------------------- /Bsp/bsp_wolfssl.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __BSP_WOLFSSL_H 3 | #define __BSP_WOLFSSL_H 4 | 5 | /*----------------------------------------------------------- 6 | * Includes files 7 | *----------------------------------------------------------*/ 8 | 9 | /*----------------------------------------------------------- 10 | * Exported constants 11 | *----------------------------------------------------------*/ 12 | 13 | 14 | /*----------------------------------------------------------- 15 | * Exported macro 16 | *----------------------------------------------------------*/ 17 | 18 | /*----------------------------------------------------------- 19 | * Exported function 20 | *----------------------------------------------------------*/ 21 | /*! 22 | * @brief 测试 wolfssl https 拉取淘宝https接口 23 | * 执行条件:无 24 | * 25 | * @retval: 拉取状态 26 | */ 27 | int test_https(void); 28 | 29 | #endif /* __BSP_WOLFSSL_H */ 30 | -------------------------------------------------------------------------------- /MDK-ARM/JLinkSettings.ini: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 0 26 | Device="ARM7" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /Bsp/bsp_dhcp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __BSP_DHCP_H 3 | #define __BSP_DHCP_H 4 | 5 | /*----------------------------------------------------------- 6 | * Includes files 7 | *----------------------------------------------------------*/ 8 | #include 9 | #include "lwip.h" 10 | 11 | /*----------------------------------------------------------- 12 | * Exported constants 13 | *----------------------------------------------------------*/ 14 | 15 | 16 | /*----------------------------------------------------------- 17 | * Exported macro 18 | *----------------------------------------------------------*/ 19 | 20 | /*----------------------------------------------------------- 21 | * Exported function 22 | *----------------------------------------------------------*/ 23 | 24 | /*! 25 | * @brief 封装 dhcp 接口 26 | * 执行条件:无 27 | * 28 | * @retval: 无 29 | */ 30 | err_t bsp_dhcp(void); 31 | 32 | #endif /* __BSP_WOLFSSL_H */ 33 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_snmpv2_framework.h: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by LwipMibCompiler 3 | */ 4 | 5 | #ifndef LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H 6 | #define LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H 7 | 8 | #include "lwip/apps/snmp_opts.h" 9 | #if LWIP_SNMP 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif /* __cplusplus */ 14 | 15 | #include "lwip/apps/snmp_core.h" 16 | 17 | extern const struct snmp_obj_id usmNoAuthProtocol; 18 | extern const struct snmp_obj_id usmHMACMD5AuthProtocol; 19 | extern const struct snmp_obj_id usmHMACSHAAuthProtocol; 20 | 21 | extern const struct snmp_obj_id usmNoPrivProtocol; 22 | extern const struct snmp_obj_id usmDESPrivProtocol; 23 | extern const struct snmp_obj_id usmAESPrivProtocol; 24 | 25 | extern const struct snmp_mib snmpframeworkmib; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif /* __cplusplus */ 30 | 31 | #endif /* LWIP_SNMP */ 32 | #endif /* LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H */ 33 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/devcrypto/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Used to build with cryptodev-linux library with Linux OS. 4 | 5 | # Quick Start 6 | 7 | ## Installing cryptodev module 8 | 9 | If not already installed then the cryptodev-linux module will need installed. 10 | 11 | ``` 12 | git clone https://github.com/cryptodev-linux/cryptodev-linux.git 13 | cd cryptodev-linux 14 | make 15 | sudo make install 16 | modprobe cryptodev 17 | ``` 18 | 19 | 20 | ## Options for building wolfSSL 21 | 22 | For default build with all supported features use: 23 | 24 | ``` 25 | ./configure --enable-cryptodev 26 | ``` 27 | 28 | Or for more control over features used: 29 | 30 | ``` 31 | ./configure --enable-devcrypto=cbc 32 | ./configure --enable-devcrypto=hash 33 | ./configure --enable-devcrypto=aes 34 | ./configure --enable-devcrypto=all 35 | ``` 36 | 37 | Then build the wolfSSL library with: 38 | 39 | ``` 40 | make 41 | sudo make install 42 | ./wolfcrypt/test/testwolfcrypt 43 | ``` 44 | -------------------------------------------------------------------------------- /Bsp/bsp_printlog.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __BSP_PRINTLOG_H 3 | #define __BSP_PRINTLOG_H 4 | 5 | /*----------------------------------------------------------- 6 | * Includes files 7 | *----------------------------------------------------------*/ 8 | 9 | /*----------------------------------------------------------- 10 | * Exported constants 11 | *----------------------------------------------------------*/ 12 | 13 | 14 | /*----------------------------------------------------------- 15 | * Exported macro 16 | *----------------------------------------------------------*/ 17 | 18 | /*----------------------------------------------------------- 19 | * Exported function 20 | *----------------------------------------------------------*/ 21 | /*! 22 | * @brief 初始化 RTT 打印接口 23 | * 执行条件:无 24 | * 25 | * @retval: 无 26 | */ 27 | void segger_rtt_init(char * str); 28 | 29 | /*! 30 | * @brief 封装 RTT 打印接口 31 | * 执行条件:无 32 | * 33 | * @retval: 无 34 | */ 35 | void print_log(const char * sFormat, ...); 36 | 37 | #endif /* __BSP_WOLFSSL_H */ 38 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/x509.h: -------------------------------------------------------------------------------- 1 | /* x509.h for openssl */ 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | /* wolfSSL_X509_print_ex flags */ 10 | #define X509_FLAG_COMPAT (0UL) 11 | #define X509_FLAG_NO_HEADER (1UL << 0) 12 | #define X509_FLAG_NO_VERSION (1UL << 1) 13 | #define X509_FLAG_NO_SERIAL (1UL << 2) 14 | #define X509_FLAG_NO_SIGNAME (1UL << 3) 15 | #define X509_FLAG_NO_ISSUER (1UL << 4) 16 | #define X509_FLAG_NO_VALIDITY (1UL << 5) 17 | #define X509_FLAG_NO_SUBJECT (1UL << 6) 18 | #define X509_FLAG_NO_PUBKEY (1UL << 7) 19 | #define X509_FLAG_NO_EXTENSIONS (1UL << 8) 20 | #define X509_FLAG_NO_SIGDUMP (1UL << 9) 21 | #define X509_FLAG_NO_AUX (1UL << 10) 22 | #define X509_FLAG_NO_ATTRIBUTES (1UL << 11) 23 | #define X509_FLAG_NO_IDS (1UL << 12) 24 | 25 | #define XN_FLAG_FN_SN 0 26 | #define XN_FLAG_SEP_CPLUS_SPC 2 27 | -------------------------------------------------------------------------------- /Bsp/bsp_printlog.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------- 2 | * Includes files 3 | *----------------------------------------------------------*/ 4 | 5 | /* segger rtt includes. */ 6 | #include "SEGGER_RTT.h" 7 | #include "SEGGER_RTT_Conf.h" 8 | 9 | #define BUFFER_INDEX 0 10 | 11 | /*! 12 | * @brief 封装 RTT 打印接口 13 | * 执行条件:无 14 | * 15 | * @retval: 无 16 | */ 17 | void print_log(const char * sFormat, ...) 18 | { 19 | va_list ParamList; 20 | va_start(ParamList, sFormat); 21 | SEGGER_RTT_vprintf(BUFFER_INDEX, sFormat, &ParamList); 22 | va_end(ParamList); 23 | } 24 | 25 | /*! 26 | * @brief 初始化 RTT 打印接口 27 | * 执行条件:无 28 | * 29 | * @retval: 无 30 | */ 31 | void segger_rtt_init(char * str) 32 | { 33 | SEGGER_RTT_Init(); 34 | print_log("==================================\n"); 35 | print_log("==================================\n"); 36 | print_log("========= %s =========\n",str); // 封装接口,无需填写 BUFFER_INDEX 37 | print_log("==================================\n"); 38 | print_log("==================================\n"); 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/rand.h: -------------------------------------------------------------------------------- 1 | /* rand.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* rand.h for openSSL */ 23 | 24 | #include 25 | #include 26 | 27 | #define RAND_set_rand_method wolfSSL_RAND_set_rand_method 28 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/asn1t.h: -------------------------------------------------------------------------------- 1 | /* asn1t.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* asn1t.h for openssl */ 23 | 24 | #ifndef WOLFSSL_ASN1T_H_ 25 | #define WOLFSSL_ASN1T_H_ 26 | 27 | #include 28 | #include 29 | 30 | #endif /* WOLFSSL_ASN1T_H_ */ 31 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/include.am: -------------------------------------------------------------------------------- 1 | # vim:ft=automake 2 | # All paths should be given relative to the root 3 | # 4 | 5 | include wolfssl/wolfcrypt/include.am 6 | include wolfssl/openssl/include.am 7 | 8 | EXTRA_DIST+= wolfssl/sniffer_error.rc 9 | 10 | nobase_include_HEADERS+= \ 11 | wolfssl/error-ssl.h \ 12 | wolfssl/ssl.h \ 13 | wolfssl/sniffer_error.h \ 14 | wolfssl/sniffer.h \ 15 | wolfssl/callbacks.h \ 16 | wolfssl/certs_test.h \ 17 | wolfssl/test.h \ 18 | wolfssl/version.h \ 19 | wolfssl/ocsp.h \ 20 | wolfssl/crl.h \ 21 | wolfssl/wolfio.h 22 | 23 | noinst_HEADERS+= \ 24 | wolfssl/internal.h 25 | 26 | # For distro build don't install options.h. 27 | # It depends on the architecture and conflicts with Multi-Arch. 28 | if BUILD_DISTRO 29 | noinst_HEADERS+= wolfssl/options.h 30 | else 31 | nobase_include_HEADERS+= wolfssl/options.h 32 | endif 33 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ossl_typ.h: -------------------------------------------------------------------------------- 1 | /* ossl_typ.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/openssl/ossl_typ.h 24 | */ 25 | 26 | 27 | #ifndef WOLFSSL_OSSL_TYP_H_ 28 | #define WOLFSSL_OSSL_TYP_H_ 29 | 30 | #include 31 | 32 | #endif /* !WOLFSSL_OSSL_TYP_H_ */ 33 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/options.h: -------------------------------------------------------------------------------- 1 | /* options.h.in 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | /* default blank options for autoconf */ 24 | 25 | #ifndef WOLFSSL_OPTIONS_H 26 | #define WOLFSSL_OPTIONS_H 27 | 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | 39 | #endif /* WOLFSSL_OPTIONS_H */ 40 | 41 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/options.h.in: -------------------------------------------------------------------------------- 1 | /* options.h.in 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | /* default blank options for autoconf */ 24 | 25 | #ifndef WOLFSSL_OPTIONS_H 26 | #define WOLFSSL_OPTIONS_H 27 | 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | 39 | #endif /* WOLFSSL_OPTIONS_H */ 40 | 41 | -------------------------------------------------------------------------------- /Bsp/bsp_sntp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __BSP_SNTP_H 3 | #define __BSP_SNTP_H 4 | 5 | #include 6 | /*----------------------------------------------------------- 7 | * Includes files 8 | *----------------------------------------------------------*/ 9 | 10 | /*----------------------------------------------------------- 11 | * Exported constants 12 | *----------------------------------------------------------*/ 13 | 14 | 15 | /*----------------------------------------------------------- 16 | * Exported macro 17 | *----------------------------------------------------------*/ 18 | 19 | /*----------------------------------------------------------- 20 | * Exported function 21 | *----------------------------------------------------------*/ 22 | 23 | /*! 24 | * @brief Lwip 的 SNTP 初始化封装接口 25 | * 执行条件:无 26 | * 27 | * @retval: 无 28 | */ 29 | void bsp_sntp_init(void); 30 | 31 | /*! 32 | * @brief SNTP 获取时间戳的处理函数 33 | * 执行条件:无 34 | * 35 | * @param [in] : sntp 获取的时间戳 36 | * 37 | * @retval: 无 38 | */ 39 | void sntp_set_time(uint32_t sntp_time); 40 | 41 | /*! 42 | * @brief 获取当前时间戳 43 | * 44 | * @param [in] none 45 | * 46 | * @retval 当前时间戳 47 | */ 48 | uint32_t get_timestamp(void); 49 | 50 | #endif /* __BSP_WOLFSSL_H */ 51 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/version.h: -------------------------------------------------------------------------------- 1 | /* wolfssl_version.h.in 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_VERSION_H 24 | #define WOLFSSL_VERSION_H 25 | 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #define LIBWOLFSSL_VERSION_STRING "4.4.0" 32 | #define LIBWOLFSSL_VERSION_HEX 0x04004000 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | 39 | #endif /* WOLFSSL_VERSION_H */ 40 | 41 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/version.h.in: -------------------------------------------------------------------------------- 1 | /* wolfssl_version.h.in 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_VERSION_H 24 | #define WOLFSSL_VERSION_H 25 | 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #define LIBWOLFSSL_VERSION_STRING "@VERSION@" 32 | #define LIBWOLFSSL_VERSION_HEX @HEX_VERSION@ 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | 39 | #endif /* WOLFSSL_VERSION_H */ 40 | 41 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h: -------------------------------------------------------------------------------- 1 | /* cavium_octeon_sync.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. (formerly known as CyaSSL) 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 20 | */ 21 | 22 | #ifndef _CAVIUM_OCTEON_SYNC_H_ 23 | #define _CAVIUM_OCTEON_SYNC_H_ 24 | 25 | #ifdef HAVE_CAVIUM_OCTEON_SYNC 26 | 27 | WOLFSSL_API int wc_CryptoCb_InitOcteon(void); 28 | WOLFSSL_API void wc_CryptoCb_CleanupOcteon(int* id); 29 | 30 | #endif /* HAVE_CAVIUM_OCTEON_SYNC */ 31 | #endif /* _CAVIUM_OCTEON_SYNC_H_ */ 32 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/test/test.h: -------------------------------------------------------------------------------- 1 | /* wolfcrypt/test/test.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFCRYPT_TEST_H 24 | #define WOLFCRYPT_TEST_H 25 | 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #ifdef HAVE_STACK_SIZE 32 | THREAD_RETURN WOLFSSL_THREAD wolfcrypt_test(void* args); 33 | #else 34 | int wolfcrypt_test(void* args); 35 | #endif 36 | 37 | #ifdef __cplusplus 38 | } /* extern "C" */ 39 | #endif 40 | 41 | 42 | #endif /* WOLFCRYPT_TEST_H */ 43 | 44 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/xilinx/xil-sha3.h: -------------------------------------------------------------------------------- 1 | /* xil-sha3.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLF_XIL_CRYPT_SHA3_H 24 | #define WOLF_XIL_CRYPT_SHA3_H 25 | 26 | #ifdef WOLFSSL_SHA3 27 | #include "xsecure_sha.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | /* Sha3 digest */ 34 | typedef struct Sha3 { 35 | XSecure_Sha3 hw; 36 | XCsuDma dma; 37 | } wc_Sha3; 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /* WOLFSSL_SHA3 */ 44 | #endif /* WOLF_XIL_CRYPT_SHA3_H */ 45 | 46 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/nrf51.h: -------------------------------------------------------------------------------- 1 | /* nrf51.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_NRF51_PORT_H 24 | #define WOLFSSL_NRF51_PORT_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #include 31 | 32 | /* Public Functions */ 33 | int nrf51_random_generate(byte* output, word32 sz); 34 | 35 | int nrf51_aes_set_key(const byte* key); 36 | int nrf51_aes_encrypt(const byte* in, const byte* key, word32 rounds, byte* out); 37 | 38 | double current_time(int reset); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif /* WOLFSSL_NRF51_PORT_H */ 45 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/conf.h: -------------------------------------------------------------------------------- 1 | /* conf.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* conf.h for openSSL */ 23 | 24 | #ifndef WOLFSSL_conf_H_ 25 | #define WOLFSSL_conf_H_ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | struct WOLFSSL_CONF_VALUE { 32 | char *section; 33 | char *name; 34 | char *value; 35 | }; 36 | 37 | struct WOLFSSL_INIT_SETTINGS { 38 | char* appname; 39 | }; 40 | 41 | typedef struct WOLFSSL_CONF_VALUE CONF_VALUE; 42 | typedef struct WOLFSSL_INIT_SETTINGS OPENSSL_INIT_SETTINGS; 43 | 44 | #ifdef __cplusplus 45 | } /* extern "C" */ 46 | #endif 47 | 48 | #endif /* WOLFSSL_conf_H_ */ 49 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/ti/ti-ccm.h: -------------------------------------------------------------------------------- 1 | /* port/ti/ti_ccm.c 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLF_CRYPT_TI_CCM_H 24 | #define WOLF_CRYPT_TI_CCM_H 25 | 26 | #ifdef HAVE_CONFIG_H 27 | #include 28 | #endif 29 | 30 | #include 31 | 32 | #if defined(WOLFSSL_TI_CRYPT) || defined(WOLFSSL_TI_HASH) 33 | 34 | int wolfSSL_TI_CCMInit(void) ; 35 | 36 | #ifndef SINGLE_THREADED 37 | void wolfSSL_TI_lockCCM(void) ; 38 | void wolfSSL_TI_unlockCCM(void) ; 39 | #else 40 | #define wolfSSL_TI_lockCCM() 41 | #define wolfSSL_TI_unlockCCM() 42 | #endif 43 | 44 | #endif 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/selftest.h: -------------------------------------------------------------------------------- 1 | /* selftest.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | #ifndef WOLFCRYPT_SELF_TEST_H 25 | #define WOLFCRYPT_SELF_TEST_H 26 | 27 | #include 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | #ifdef HAVE_SELFTEST 35 | /* Get wolfCrypt CAVP version */ 36 | WOLFSSL_API const char* wolfCrypt_GetVersion_CAVP_selftest(void); 37 | 38 | /* wolfCrypt self test, runs CAVP KATs */ 39 | WOLFSSL_API int wolfCrypt_SelfTest(void); 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif 45 | 46 | #endif /* WOLFCRYPT_SELF_TEST_H */ 47 | 48 | 49 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/tls1.h: -------------------------------------------------------------------------------- 1 | /* tls1.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_OPENSSL_TLS1_H_ 24 | #define WOLFSSL_OPENSSL_TLS1_H_ 25 | 26 | #ifndef TLS1_VERSION 27 | #define TLS1_VERSION 0x0301 28 | #endif 29 | 30 | #ifndef TLS1_1_VERSION 31 | #define TLS1_1_VERSION 0x0302 32 | #endif 33 | 34 | #ifndef TLS1_2_VERSION 35 | #define TLS1_2_VERSION 0x0303 36 | #endif 37 | 38 | #ifndef TLS1_3_VERSION 39 | #define TLS1_3_VERSION 0x0304 40 | #endif 41 | 42 | #ifndef TLS_MAX_VERSION 43 | #define TLS_MAX_VERSION TLS1_3_VERSION 44 | #endif 45 | 46 | #endif /* WOLFSSL_OPENSSL_TLS1_H_ */ 47 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/x509_vfy.h: -------------------------------------------------------------------------------- 1 | /* x509_vfy.h 2 | * 3 | * Copyright (C) 2006-2017 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* x509_vfy.h for openSSL */ 23 | 24 | #ifndef WOLFSSL_x509_vfy_H_ 25 | #define WOLFSSL_x509_vfy_H_ 26 | 27 | #include 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | #if defined(WOLFSSL_QT) || defined(OPENSSL_ALL) 34 | WOLFSSL_API int wolfSSL_X509_STORE_CTX_set_purpose(WOLFSSL_X509_STORE_CTX *ctx, int purpose); 35 | #endif 36 | 37 | #ifdef WOLFSSL_QT 38 | #define X509_STORE_CTX_set_purpose wolfSSL_X509_STORE_CTX_set_purpose 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } /* extern "C" */ 43 | #endif 44 | 45 | #endif /* WOLFSSL_x509_vfy_H_ */ 46 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ec448.h: -------------------------------------------------------------------------------- 1 | /* ec448.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* ec448.h */ 23 | 24 | #ifndef WOLFSSL_EC448_H_ 25 | #define WOLFSSL_EC448_H_ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | WOLFSSL_API 32 | int wolfSSL_EC448_generate_key(unsigned char *priv, unsigned int *privSz, 33 | unsigned char *pub, unsigned int *pubSz); 34 | 35 | WOLFSSL_API 36 | int wolfSSL_EC448_shared_key(unsigned char *shared, unsigned int *sharedSz, 37 | const unsigned char *priv, unsigned int privSz, 38 | const unsigned char *pub, unsigned int pubSz); 39 | 40 | #ifdef __cplusplus 41 | } /* extern "C" */ 42 | #endif 43 | 44 | #endif /* header */ 45 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | /* buffer.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_BUFFER_H_ 24 | #define WOLFSSL_BUFFER_H_ 25 | 26 | #include 27 | #include 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | 34 | WOLFSSL_API WOLFSSL_BUF_MEM* wolfSSL_BUF_MEM_new(void); 35 | WOLFSSL_API int wolfSSL_BUF_MEM_grow(WOLFSSL_BUF_MEM* buf, size_t len); 36 | WOLFSSL_API void wolfSSL_BUF_MEM_free(WOLFSSL_BUF_MEM* buf); 37 | 38 | 39 | #define BUF_MEM_new wolfSSL_BUF_MEM_new 40 | #define BUF_MEM_grow wolfSSL_BUF_MEM_grow 41 | #define BUF_MEM_free wolfSSL_BUF_MEM_free 42 | 43 | #ifdef __cplusplus 44 | } /* extern "C" */ 45 | #endif 46 | 47 | #endif /* WOLFSSL_BUFFER_H_ */ 48 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ec25519.h: -------------------------------------------------------------------------------- 1 | /* ec25519.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* ec25519.h */ 23 | 24 | #ifndef WOLFSSL_EC25519_H_ 25 | #define WOLFSSL_EC25519_H_ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | WOLFSSL_API 32 | int wolfSSL_EC25519_generate_key(unsigned char *priv, unsigned int *privSz, 33 | unsigned char *pub, unsigned int *pubSz); 34 | 35 | WOLFSSL_API 36 | int wolfSSL_EC25519_shared_key(unsigned char *shared, unsigned int *sharedSz, 37 | const unsigned char *priv, unsigned int privSz, 38 | const unsigned char *pub, unsigned int pubSz); 39 | 40 | #ifdef __cplusplus 41 | } /* extern "C" */ 42 | #endif 43 | 44 | #endif /* header */ 45 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/user-crypto/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.63]) 5 | AC_INIT([usercypto], [0.1], []) 6 | AC_CONFIG_SRCDIR([src/rsa.c]) 7 | 8 | AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests]) 9 | 10 | LT_PREREQ([2.2]) 11 | LT_INIT([disable-static]) 12 | LT_LANG([C++]) 13 | LT_LANG([C]) 14 | 15 | # Checks for programs. 16 | AC_PROG_CC 17 | AC_CONFIG_MACRO_DIR([m4]) 18 | 19 | # Checks for libraries. 20 | AM_LDFLAGS=$LDFLAGS 21 | LDFLAGS="$LDFLAGS -L/opt/intel/ipp/lib -lippcp -lippcore" 22 | 23 | # Path to find wolfssl/options and other includes 24 | AM_CPPFLAGS=$CPPFLAGS 25 | CPPFLAGS="$CPPFLAGS -I../../ -I/opt/intel/ipp/include" 26 | AC_CHECK_LIB([ippcore], [ippGetStatusString], [], [AC_MSG_ERROR([ippcore library needed ./configure LDFLAGS=/path/to/ipp/lib])]) 27 | AC_CHECK_LIB([ippcp], [ippsRSA_InitPublicKey], [], [AC_MSG_ERROR([ippcp library needed ./configure LDFLAGS=/path/to/ipp/lib])]) 28 | 29 | # check headers 30 | AC_CHECK_HEADER([ippcp.h], [], [AC_MSG_ERROR([ippcp.h not found ./configure CPPFLAGS=-I/ipp/headers])]) 31 | AC_CHECK_HEADER([ipp.h], [], [AC_MSG_ERROR([ipp.h not found ./configure CPPFLAGS=-I/ipp/headers])]) 32 | 33 | LDFLAGS=$AM_LDFLAGS 34 | CPPFLAGS=$AM_CPPFLAGS 35 | 36 | AM_LDFLAGS="-L/opt/intel/ipp/lib -lippcp -lippcore" 37 | AM_CPPFLAGS="-I/opt/intel/ipp/include" 38 | 39 | AC_SUBST([AM_CPPFLAGS]) 40 | AC_SUBST([AM_LDFLAGS]) 41 | AC_C_INLINE 42 | 43 | AC_CONFIG_FILES([Makefile]) 44 | AC_OUTPUT 45 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/obj_mac.h: -------------------------------------------------------------------------------- 1 | /* obj_mac.h 2 | * 3 | * Copyright (C) 2006-2017 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* obj_mac.h for openSSL */ 23 | 24 | #ifndef WOLFSSL_OBJ_MAC_H_ 25 | #define WOLFSSL_OBJ_MAC_H_ 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #define NID_sect163k1 721 31 | #define NID_sect163r1 722 32 | #define NID_sect163r2 723 33 | #define NID_sect193r1 724 34 | #define NID_sect193r2 725 35 | #define NID_sect233k1 726 36 | #define NID_sect233r1 727 37 | #define NID_sect239k1 728 38 | #define NID_sect283k1 729 39 | #define NID_sect283r1 730 40 | #define NID_sect409k1 731 41 | #define NID_sect409r1 732 42 | #define NID_sect571k1 733 43 | #define NID_sect571r1 734 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /* WOLFSSL_OBJ_MAC_H_ */ 50 | 51 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/af_alg/afalg_hash.h: -------------------------------------------------------------------------------- 1 | /* afalg_hash.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLF_CRYPT_AFALG_HASH_H 24 | #define WOLF_CRYPT_AFALG_HASH_H 25 | 26 | #include 27 | 28 | #undef WOLFSSL_NO_HASH_RAW 29 | #define WOLFSSL_NO_HASH_RAW 30 | 31 | typedef struct { 32 | byte* msg; 33 | void* heap; 34 | word32 used; 35 | word32 len; 36 | int alFd; 37 | int rdFd; 38 | } wolfssl_AFALG_Hash; 39 | 40 | 41 | 42 | #if !defined(NO_SHA256) && defined(WOLFSSL_AFALG_HASH) 43 | typedef wolfssl_AFALG_Hash wc_Sha256; 44 | #endif 45 | #if defined(WOLFSSL_SHA3) && defined(WOLFSSL_AFALG_XILINX_SHA3) 46 | typedef wolfssl_AFALG_Hash wc_Sha3; 47 | #endif 48 | 49 | #endif /* WOLF_CRYPT_AFALG_HASH_H */ 50 | 51 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/crl.h: -------------------------------------------------------------------------------- 1 | /* crl.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | #ifndef WOLFSSL_CRL_H 25 | #define WOLFSSL_CRL_H 26 | 27 | 28 | #ifdef HAVE_CRL 29 | 30 | #include 31 | #include 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | WOLFSSL_LOCAL int InitCRL(WOLFSSL_CRL*, WOLFSSL_CERT_MANAGER*); 38 | WOLFSSL_LOCAL void FreeCRL(WOLFSSL_CRL*, int dynamic); 39 | 40 | WOLFSSL_LOCAL int LoadCRL(WOLFSSL_CRL* crl, const char* path, int type, int mon); 41 | WOLFSSL_LOCAL int BufferLoadCRL(WOLFSSL_CRL*, const byte*, long, int, int); 42 | WOLFSSL_LOCAL int CheckCertCRL(WOLFSSL_CRL*, DecodedCert*); 43 | 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /* HAVE_CRL */ 50 | #endif /* WOLFSSL_CRL_H */ 51 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * chap-md5.h - New CHAP/MD5 implementation. 3 | * 4 | * Copyright (c) 2003 Paul Mackerras. All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. The name(s) of the authors of this software must not be used to 14 | * endorse or promote products derived from this software without 15 | * prior written permission. 16 | * 17 | * 3. Redistributions of any form whatsoever must retain the following 18 | * acknowledgment: 19 | * "This product includes software developed by Paul Mackerras 20 | * ". 21 | * 22 | * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO 23 | * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 24 | * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY 25 | * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 26 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 27 | * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 28 | * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 29 | */ 30 | 31 | #include "netif/ppp/ppp_opts.h" 32 | #if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ 33 | 34 | extern const struct chap_digest_type md5_digest; 35 | 36 | #endif /* PPP_SUPPORT && CHAP_SUPPORT */ 37 | -------------------------------------------------------------------------------- /Core/Inc/gpio.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : gpio.h 4 | * Description : This file contains all the functions prototypes for 5 | * the gpio 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __gpio_H 22 | #define __gpio_H 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | #include "main.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* USER CODE BEGIN Private defines */ 35 | 36 | /* USER CODE END Private defines */ 37 | 38 | void MX_GPIO_Init(void); 39 | 40 | /* USER CODE BEGIN Prototypes */ 41 | 42 | /* USER CODE END Prototypes */ 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | #endif /*__ pinoutConfig_H */ 48 | 49 | /** 50 | * @} 51 | */ 52 | 53 | /** 54 | * @} 55 | */ 56 | 57 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 58 | -------------------------------------------------------------------------------- /Core/Inc/rng.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : RNG.h 4 | * Description : This file provides code for the configuration 5 | * of the RNG instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __rng_H 21 | #define __rng_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern RNG_HandleTypeDef hrng; 34 | 35 | /* USER CODE BEGIN Private defines */ 36 | 37 | /* USER CODE END Private defines */ 38 | 39 | void MX_RNG_Init(void); 40 | 41 | /* USER CODE BEGIN Prototypes */ 42 | 43 | /* USER CODE END Prototypes */ 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | #endif /*__ rng_H */ 49 | 50 | /** 51 | * @} 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 59 | -------------------------------------------------------------------------------- /Core/Inc/rtc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : RTC.h 4 | * Description : This file provides code for the configuration 5 | * of the RTC instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __rtc_H 21 | #define __rtc_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern RTC_HandleTypeDef hrtc; 34 | 35 | /* USER CODE BEGIN Private defines */ 36 | 37 | /* USER CODE END Private defines */ 38 | 39 | void MX_RTC_Init(void); 40 | 41 | /* USER CODE BEGIN Prototypes */ 42 | 43 | /* USER CODE END Prototypes */ 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | #endif /*__ rtc_H */ 49 | 50 | /** 51 | * @} 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 59 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/compat/posix/netdb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * This file is a posix wrapper for lwip/netdb.h. 4 | */ 5 | 6 | /* 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 3. The name of the author may not be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 27 | * OF SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | */ 32 | 33 | #include "lwip/netdb.h" 34 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/compat/stdc/errno.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * This file is a posix/stdc wrapper for lwip/errno.h. 4 | */ 5 | 6 | /* 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 3. The name of the author may not be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 27 | * OF SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | */ 32 | 33 | #include "lwip/errno.h" 34 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa/inet.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * This file is a posix wrapper for lwip/sockets.h. 4 | */ 5 | 6 | /* 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 3. The name of the author may not be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 27 | * OF SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | */ 32 | 33 | #include "lwip/sockets.h" 34 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/compat/posix/sys/socket.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * This file is a posix wrapper for lwip/sockets.h. 4 | */ 5 | 6 | /* 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 3. The name of the author may not be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 27 | * OF SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | */ 32 | 33 | #include "lwip/sockets.h" 34 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ed448.h: -------------------------------------------------------------------------------- 1 | /* ed448.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* ed448.h */ 23 | 24 | #ifndef WOLFSSL_ED448_H_ 25 | #define WOLFSSL_ED448_H_ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | WOLFSSL_API 32 | int wolfSSL_ED448_generate_key(unsigned char *priv, unsigned int *privSz, 33 | unsigned char *pub, unsigned int *pubSz); 34 | WOLFSSL_API 35 | int wolfSSL_ED448_sign(const unsigned char *msg, unsigned int msgSz, 36 | const unsigned char *priv, unsigned int privSz, 37 | unsigned char *sig, unsigned int *sigSz); 38 | WOLFSSL_API 39 | int wolfSSL_ED448_verify(const unsigned char *msg, unsigned int msgSz, 40 | const unsigned char *pub, unsigned int pubSz, 41 | const unsigned char *sig, unsigned int sigSz); 42 | 43 | #ifdef __cplusplus 44 | } /* extern "C" */ 45 | #endif 46 | 47 | #endif /* header */ 48 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | /* opensslv.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* opensslv.h compatibility */ 23 | 24 | #ifndef WOLFSSL_OPENSSLV_H_ 25 | #define WOLFSSL_OPENSSLV_H_ 26 | 27 | 28 | /* api version compatibility */ 29 | #if defined(WOLFSSL_APACHE_HTTPD) 30 | /* For Apache httpd, Use 1.1.0 compatibility */ 31 | #define OPENSSL_VERSION_NUMBER 0x10100000L 32 | #elif defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) || defined(HAVE_LIGHTY) || \ 33 | defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) || \ 34 | defined(WOLFSSL_OPENSSH) || defined(WOLFSSL_QT) 35 | /* version number can be increased for Lighty after compatibility for ECDH 36 | is added */ 37 | #define OPENSSL_VERSION_NUMBER 0x1000100fL 38 | #else 39 | #define OPENSSL_VERSION_NUMBER 0x0090810fL 40 | #endif 41 | 42 | #define OPENSSL_VERSION_TEXT LIBWOLFSSL_VERSION_STRING 43 | #define OPENSSL_VERSION 0 44 | 45 | #endif /* header */ 46 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* ecdh.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* ecdh.h for openssl */ 23 | 24 | #ifndef WOLFSSL_ECDH_H_ 25 | #define WOLFSSL_ECDH_H_ 26 | 27 | #include 28 | #include 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | 35 | WOLFSSL_API int wolfSSL_ECDH_compute_key(void *out, size_t outlen, 36 | const WOLFSSL_EC_POINT *pub_key, 37 | WOLFSSL_EC_KEY *ecdh, 38 | void *(*KDF) (const void *in, 39 | size_t inlen, 40 | void *out, 41 | size_t *outlen)); 42 | 43 | #define ECDH_compute_key wolfSSL_ECDH_compute_key 44 | 45 | #ifdef __cplusplus 46 | } /* extern C */ 47 | #endif 48 | 49 | #endif /* header */ 50 | -------------------------------------------------------------------------------- /Core/Inc/fmc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : FMC.h 4 | * Description : This file provides code for the configuration 5 | * of the FMC peripheral. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __FMC_H 21 | #define __FMC_H 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | #include "main.h" 28 | 29 | /* USER CODE BEGIN Includes */ 30 | 31 | /* USER CODE END Includes */ 32 | 33 | extern SRAM_HandleTypeDef hsram1; 34 | 35 | /* USER CODE BEGIN Private defines */ 36 | 37 | /* USER CODE END Private defines */ 38 | 39 | void MX_FMC_Init(void); 40 | void HAL_SRAM_MspInit(SRAM_HandleTypeDef* hsram); 41 | void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef* hsram); 42 | 43 | /* USER CODE BEGIN Prototypes */ 44 | 45 | /* USER CODE END Prototypes */ 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | #endif /*__FMC_H */ 51 | 52 | /** 53 | * @} 54 | */ 55 | 56 | /** 57 | * @} 58 | */ 59 | 60 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 61 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/system/arch/bpstruct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #if defined(__IAR_SYSTEMS_ICC__) 34 | #pragma pack(1) 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/system/arch/epstruct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #if defined(__IAR_SYSTEMS_ICC__) 34 | #pragma pack() 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ed25519.h: -------------------------------------------------------------------------------- 1 | /* ed25519.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* ed25519.h */ 23 | 24 | #ifndef WOLFSSL_ED25519_H_ 25 | #define WOLFSSL_ED25519_H_ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | WOLFSSL_API 32 | int wolfSSL_ED25519_generate_key(unsigned char *priv, unsigned int *privSz, 33 | unsigned char *pub, unsigned int *pubSz); 34 | WOLFSSL_API 35 | int wolfSSL_ED25519_sign(const unsigned char *msg, unsigned int msgSz, 36 | const unsigned char *priv, unsigned int privSz, 37 | unsigned char *sig, unsigned int *sigSz); 38 | WOLFSSL_API 39 | int wolfSSL_ED25519_verify(const unsigned char *msg, unsigned int msgSz, 40 | const unsigned char *pub, unsigned int pubSz, 41 | const unsigned char *sig, unsigned int sigSz); 42 | 43 | #ifdef __cplusplus 44 | } /* extern "C" */ 45 | #endif 46 | 47 | #endif /* header */ 48 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/compress.h: -------------------------------------------------------------------------------- 1 | /* compress.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/compress.h 24 | */ 25 | 26 | 27 | #ifndef WOLF_CRYPT_COMPRESS_H 28 | #define WOLF_CRYPT_COMPRESS_H 29 | 30 | #include 31 | 32 | #ifdef HAVE_LIBZ 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | 39 | #define COMPRESS_FIXED 1 40 | 41 | #define LIBZ_WINBITS_GZIP 16 42 | 43 | 44 | WOLFSSL_API int wc_Compress(byte*, word32, const byte*, word32, word32); 45 | WOLFSSL_API int wc_Compress_ex(byte* out, word32 outSz, const byte* in, 46 | word32 inSz, word32 flags, word32 windowBits); 47 | WOLFSSL_API int wc_DeCompress(byte*, word32, const byte*, word32); 48 | WOLFSSL_API int wc_DeCompress_ex(byte* out, word32 outSz, const byte* in, 49 | word32 inSz, int windowBits); 50 | 51 | #ifdef __cplusplus 52 | } /* extern "C" */ 53 | #endif 54 | 55 | 56 | #endif /* HAVE_LIBZ */ 57 | #endif /* WOLF_CRYPT_COMPRESS_H */ 58 | 59 | -------------------------------------------------------------------------------- /Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/system/arch/lib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __LIB_H__ 33 | #define __LIB_H__ 34 | 35 | #include 36 | 37 | 38 | #endif /* __LIB_H__ */ 39 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/pkcs12.h: -------------------------------------------------------------------------------- 1 | /* pkcs12.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* pkcs12.h for openssl */ 23 | 24 | 25 | #include 26 | #include 27 | 28 | #ifndef WOLFSSL_PKCS12_COMPAT_H_ 29 | #define WOLFSSL_PKCS12_COMPAT_H_ 30 | 31 | #define NID_pbe_WithSHA1AndDES_CBC 2 32 | #define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 3 33 | #define NID_pbe_WithSHA1And128BitRC4 1 34 | 35 | #define PKCS12_DEFAULT_ITER WC_PKCS12_ITT_DEFAULT 36 | 37 | /* wolfCrypt level does not make use of ssl.h */ 38 | #define PKCS12 WC_PKCS12 39 | #define PKCS12_new wc_PKCS12_new 40 | #define PKCS12_free wc_PKCS12_free 41 | 42 | /* wolfSSL level using structs from ssl.h and calls down to wolfCrypt */ 43 | #define d2i_PKCS12_bio wolfSSL_d2i_PKCS12_bio 44 | #define PKCS12_parse wolfSSL_PKCS12_parse 45 | #define PKCS12_create wolfSSL_PKCS12_create 46 | #define PKCS12_PBE_add wolfSSL_PKCS12_PBE_add 47 | 48 | #endif /* WOLFSSL_PKCS12_COMPAT_H_ */ 49 | 50 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/compat/posix/net/if.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * This file is a posix wrapper for lwip/if_api.h. 4 | */ 5 | 6 | /* 7 | * Copyright (c) 2017 Joel Cunningham, Garmin International, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, 11 | * are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, 16 | * this list of conditions and the following disclaimer in the documentation 17 | * and/or other materials provided with the distribution. 18 | * 3. The name of the author may not be used to endorse or promote products 19 | * derived from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 24 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 26 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 29 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 30 | * OF SUCH DAMAGE. 31 | * 32 | * This file is part of the lwIP TCP/IP stack. 33 | * 34 | */ 35 | 36 | #include "lwip/if_api.h" 37 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* md4.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_MD4_H_ 24 | #define WOLFSSL_MD4_H_ 25 | 26 | #include 27 | 28 | #ifndef NO_MD4 29 | 30 | #ifdef WOLFSSL_PREFIX 31 | #include "prefix_md4.h" 32 | #endif 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | 39 | typedef struct WOLFSSL_MD4_CTX { 40 | int buffer[32]; /* big enough to hold, check size in Init */ 41 | } WOLFSSL_MD4_CTX; 42 | 43 | 44 | WOLFSSL_API void wolfSSL_MD4_Init(WOLFSSL_MD4_CTX*); 45 | WOLFSSL_API void wolfSSL_MD4_Update(WOLFSSL_MD4_CTX*, const void*, unsigned long); 46 | WOLFSSL_API void wolfSSL_MD4_Final(unsigned char*, WOLFSSL_MD4_CTX*); 47 | 48 | 49 | typedef WOLFSSL_MD4_CTX MD4_CTX; 50 | 51 | #define MD4_Init wolfSSL_MD4_Init 52 | #define MD4_Update wolfSSL_MD4_Update 53 | #define MD4_Final wolfSSL_MD4_Final 54 | 55 | #ifdef __cplusplus 56 | } /* extern "C" */ 57 | #endif 58 | 59 | #endif /* NO_MD4 */ 60 | 61 | #endif /* WOLFSSL_MD4_H_ */ 62 | 63 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/intel/quickassist_sync.h: -------------------------------------------------------------------------------- 1 | /* quickassist_sync.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. (formerly known as CyaSSL) 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 20 | */ 21 | 22 | #ifndef _INTEL_QUICKASSIST_SYNC_H_ 23 | #define _INTEL_QUICKASSIST_SYNC_H_ 24 | 25 | #ifdef HAVE_INTEL_QA_SYNC 26 | 27 | WOLFSSL_API int wc_CryptoCb_InitIntelQa(void); 28 | WOLFSSL_API void wc_CryptoCb_CleanupIntelQa(int* id); 29 | 30 | WOLFSSL_API void* wc_CryptoCb_IntelQaMalloc(size_t size, 31 | void* heap, int type 32 | #ifdef WOLFSSL_DEBUG_MEMORY 33 | , const char* func, unsigned int line 34 | #endif 35 | ); 36 | 37 | WOLFSSL_API void wc_CryptoCb_IntelQaFree(void *ptr, 38 | void* heap, int type 39 | #ifdef WOLFSSL_DEBUG_MEMORY 40 | , const char* func, unsigned int line 41 | #endif 42 | ); 43 | 44 | WOLFSSL_API void* wc_CryptoCb_IntelQaRealloc(void *ptr, 45 | size_t size, void* heap, int type 46 | #ifdef WOLFSSL_DEBUG_MEMORY 47 | , const char* func, unsigned int line 48 | #endif 49 | ); 50 | 51 | #endif /* HAVE_INTEL_QA_SYNC */ 52 | 53 | #endif /* _INTEL_QUICKASSIST_SYNC_H_ */ 54 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/ti/ti-hash.h: -------------------------------------------------------------------------------- 1 | /* port/ti/ti-hash.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLF_CRYPT_TI_HASH_H 24 | #define WOLF_CRYPT_TI_HASH_H 25 | 26 | #include 27 | 28 | #ifndef WOLFSSL_TI_INITBUFF 29 | #define WOLFSSL_TI_INITBUFF 64 30 | #endif 31 | 32 | #ifndef WOLFSSL_MAX_HASH_SIZE 33 | #define WOLFSSL_MAX_HASH_SIZE 64 34 | #endif 35 | 36 | #define WOLFSSL_NO_HASH_RAW 37 | 38 | typedef struct { 39 | byte *msg; 40 | word32 used; 41 | word32 len; 42 | byte hash[WOLFSSL_MAX_HASH_SIZE]; 43 | } wolfssl_TI_Hash; 44 | 45 | 46 | #ifndef TI_HASH_TEST 47 | 48 | #if !defined(NO_MD5) 49 | typedef wolfssl_TI_Hash wc_Md5; 50 | #endif 51 | #if !defined(NO_SHA) 52 | typedef wolfssl_TI_Hash wc_Sha; 53 | #endif 54 | #if !defined(NO_SHA256) 55 | typedef wolfssl_TI_Hash wc_Sha256; 56 | #endif 57 | #if defined(WOLFSSL_SHA224) 58 | typedef wolfssl_TI_Hash wc_Sha224; 59 | #endif 60 | 61 | #endif /* !TI_HASH_TEST */ 62 | 63 | #endif /* WOLF_CRYPT_TI_HASH_H */ 64 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/system/arch/cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __CPU_H__ 33 | #define __CPU_H__ 34 | 35 | #ifndef BYTE_ORDER 36 | #define BYTE_ORDER LITTLE_ENDIAN 37 | #endif 38 | 39 | #endif /* __CPU_H__ */ 40 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* ripemd.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* ripemd.h for openssl */ 23 | 24 | 25 | #ifndef WOLFSSL_RIPEMD_H_ 26 | #define WOLFSSL_RIPEMD_H_ 27 | 28 | #include 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | 35 | typedef struct WOLFSSL_RIPEMD_CTX { 36 | int holder[32]; /* big enough to hold wolfcrypt, but check on init */ 37 | } WOLFSSL_RIPEMD_CTX; 38 | 39 | WOLFSSL_API void wolfSSL_RIPEMD_Init(WOLFSSL_RIPEMD_CTX*); 40 | WOLFSSL_API void wolfSSL_RIPEMD_Update(WOLFSSL_RIPEMD_CTX*, const void*, 41 | unsigned long); 42 | WOLFSSL_API void wolfSSL_RIPEMD_Final(unsigned char*, WOLFSSL_RIPEMD_CTX*); 43 | 44 | 45 | typedef WOLFSSL_RIPEMD_CTX RIPEMD_CTX; 46 | 47 | #define RIPEMD_Init wolfSSL_RIPEMD_Init 48 | #define RIPEMD_Update wolfSSL_RIPEMD_Update 49 | #define RIPEMD_Final wolfSSL_RIPEMD_Final 50 | 51 | 52 | #ifdef __cplusplus 53 | } /* extern "C" */ 54 | #endif 55 | 56 | 57 | #endif /* WOLFSSL_MD5_H_ */ 58 | 59 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/system/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __PERF_H__ 33 | #define __PERF_H__ 34 | 35 | #define PERF_START /* null definition */ 36 | #define PERF_STOP(x) /* null definition */ 37 | 38 | #endif /* __PERF_H__ */ 39 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/fips_test.h: -------------------------------------------------------------------------------- 1 | /* fips_test.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | #ifndef WOLF_CRYPT_FIPS_TEST_H 25 | #define WOLF_CRYPT_FIPS_TEST_H 26 | 27 | #include 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | /* Known Answer Test string inputs are hex, internal */ 35 | WOLFSSL_LOCAL int DoKnownAnswerTests(char*, int); 36 | 37 | 38 | /* FIPS failure callback */ 39 | typedef void(*wolfCrypt_fips_cb)(int ok, int err, const char* hash); 40 | 41 | /* Public set function */ 42 | WOLFSSL_API int wolfCrypt_SetCb_fips(wolfCrypt_fips_cb cbf); 43 | 44 | /* Public get status functions */ 45 | WOLFSSL_API int wolfCrypt_GetStatus_fips(void); 46 | WOLFSSL_API const char* wolfCrypt_GetCoreHash_fips(void); 47 | 48 | #ifdef HAVE_FORCE_FIPS_FAILURE 49 | /* Public function to force failure mode for operational testing */ 50 | WOLFSSL_API int wolfCrypt_SetStatus_fips(int); 51 | #endif 52 | 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /* WOLF_CRYPT_FIPS_TEST_H */ 59 | 60 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap_ms.h: -------------------------------------------------------------------------------- 1 | /* 2 | * chap_ms.h - Challenge Handshake Authentication Protocol definitions. 3 | * 4 | * Copyright (c) 1995 Eric Rosenquist. All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in 15 | * the documentation and/or other materials provided with the 16 | * distribution. 17 | * 18 | * 3. The name(s) of the authors of this software must not be used to 19 | * endorse or promote products derived from this software without 20 | * prior written permission. 21 | * 22 | * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO 23 | * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 24 | * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY 25 | * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 26 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 27 | * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 28 | * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 29 | * 30 | * $Id: chap_ms.h,v 1.13 2004/11/15 22:13:26 paulus Exp $ 31 | */ 32 | 33 | #include "netif/ppp/ppp_opts.h" 34 | #if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ 35 | 36 | #ifndef CHAPMS_INCLUDE 37 | #define CHAPMS_INCLUDE 38 | 39 | extern const struct chap_digest_type chapms_digest; 40 | extern const struct chap_digest_type chapms2_digest; 41 | 42 | #endif /* CHAPMS_INCLUDE */ 43 | 44 | #endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ 45 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/fp_mul_comba_3.i: -------------------------------------------------------------------------------- 1 | /* fp_mul_comba_3.i 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | #ifdef TFM_MUL3 25 | int fp_mul_comba3(fp_int *A, fp_int *B, fp_int *C) 26 | { 27 | fp_digit c0, c1, c2, at[6]; 28 | 29 | XMEMCPY(at, A->dp, 3 * sizeof(fp_digit)); 30 | XMEMCPY(at+3, B->dp, 3 * sizeof(fp_digit)); 31 | COMBA_START; 32 | 33 | COMBA_CLEAR; 34 | /* 0 */ 35 | MULADD(at[0], at[3]); 36 | COMBA_STORE(C->dp[0]); 37 | /* 1 */ 38 | COMBA_FORWARD; 39 | MULADD(at[0], at[4]); MULADD(at[1], at[3]); 40 | COMBA_STORE(C->dp[1]); 41 | /* 2 */ 42 | COMBA_FORWARD; 43 | MULADD(at[0], at[5]); MULADD(at[1], at[4]); MULADD(at[2], at[3]); 44 | COMBA_STORE(C->dp[2]); 45 | /* 3 */ 46 | COMBA_FORWARD; 47 | MULADD(at[1], at[5]); MULADD(at[2], at[4]); 48 | COMBA_STORE(C->dp[3]); 49 | /* 4 */ 50 | COMBA_FORWARD; 51 | MULADD(at[2], at[5]); 52 | COMBA_STORE(C->dp[4]); 53 | COMBA_STORE2(C->dp[5]); 54 | C->used = 6; 55 | C->sign = A->sign ^ B->sign; 56 | fp_clamp(C); 57 | COMBA_FINI; 58 | 59 | return FP_OKAY; 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/fp_sqr_comba_3.i: -------------------------------------------------------------------------------- 1 | /* fp_sqr_comba_3.i 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | #ifdef TFM_SQR3 25 | int fp_sqr_comba3(fp_int *A, fp_int *B) 26 | { 27 | fp_digit *a, b[6], c0, c1, c2; 28 | #ifdef TFM_ISO 29 | fp_word tt; 30 | #endif 31 | 32 | a = A->dp; 33 | COMBA_START; 34 | 35 | /* clear carries */ 36 | CLEAR_CARRY; 37 | 38 | /* output 0 */ 39 | SQRADD(a[0],a[0]); 40 | COMBA_STORE(b[0]); 41 | 42 | /* output 1 */ 43 | CARRY_FORWARD; 44 | SQRADD2(a[0], a[1]); 45 | COMBA_STORE(b[1]); 46 | 47 | /* output 2 */ 48 | CARRY_FORWARD; 49 | SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); 50 | COMBA_STORE(b[2]); 51 | 52 | /* output 3 */ 53 | CARRY_FORWARD; 54 | SQRADD2(a[1], a[2]); 55 | COMBA_STORE(b[3]); 56 | 57 | /* output 4 */ 58 | CARRY_FORWARD; 59 | SQRADD(a[2], a[2]); 60 | COMBA_STORE(b[4]); 61 | COMBA_STORE2(b[5]); 62 | COMBA_FINI; 63 | 64 | B->used = 6; 65 | B->sign = FP_ZPOS; 66 | XMEMCPY(B->dp, b, 6 * sizeof(fp_digit)); 67 | fp_clamp(B); 68 | 69 | return FP_OKAY; 70 | } 71 | #endif 72 | 73 | 74 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/md2.h: -------------------------------------------------------------------------------- 1 | /* md2.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/md2.h 24 | */ 25 | 26 | 27 | #ifndef WOLF_CRYPT_MD2_H 28 | #define WOLF_CRYPT_MD2_H 29 | 30 | #include 31 | 32 | #ifdef WOLFSSL_MD2 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /* in bytes */ 39 | enum { 40 | MD2 = WC_HASH_TYPE_MD2, 41 | MD2_BLOCK_SIZE = 16, 42 | MD2_DIGEST_SIZE = 16, 43 | MD2_PAD_SIZE = 16, 44 | MD2_X_SIZE = 48 45 | }; 46 | 47 | 48 | /* Md2 digest */ 49 | typedef struct Md2 { 50 | word32 count; /* bytes % PAD_SIZE */ 51 | byte X[MD2_X_SIZE]; 52 | byte C[MD2_BLOCK_SIZE]; 53 | byte buffer[MD2_BLOCK_SIZE]; 54 | } Md2; 55 | 56 | 57 | WOLFSSL_API void wc_InitMd2(Md2*); 58 | WOLFSSL_API void wc_Md2Update(Md2*, const byte*, word32); 59 | WOLFSSL_API void wc_Md2Final(Md2*, byte*); 60 | WOLFSSL_API int wc_Md2Hash(const byte*, word32, byte*); 61 | 62 | 63 | #ifdef __cplusplus 64 | } /* extern "C" */ 65 | #endif 66 | 67 | #endif /* WOLFSSL_MD2 */ 68 | #endif /* WOLF_CRYPT_MD2_H */ 69 | 70 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/md4.h: -------------------------------------------------------------------------------- 1 | /* md4.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/md4.h 24 | */ 25 | 26 | #ifndef WOLF_CRYPT_MD4_H 27 | #define WOLF_CRYPT_MD4_H 28 | 29 | #include 30 | 31 | #ifndef NO_MD4 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* in bytes */ 38 | enum { 39 | MD4 = WC_HASH_TYPE_MD4, 40 | MD4_BLOCK_SIZE = 64, 41 | MD4_DIGEST_SIZE = 16, 42 | MD4_PAD_SIZE = 56 43 | }; 44 | 45 | 46 | /* MD4 digest */ 47 | typedef struct Md4 { 48 | word32 buffLen; /* in bytes */ 49 | word32 loLen; /* length in bytes */ 50 | word32 hiLen; /* length in bytes */ 51 | word32 digest[MD4_DIGEST_SIZE / sizeof(word32)]; 52 | word32 buffer[MD4_BLOCK_SIZE / sizeof(word32)]; 53 | } Md4; 54 | 55 | 56 | WOLFSSL_API void wc_InitMd4(Md4*); 57 | WOLFSSL_API void wc_Md4Update(Md4*, const byte*, word32); 58 | WOLFSSL_API void wc_Md4Final(Md4*, byte*); 59 | 60 | 61 | #ifdef __cplusplus 62 | } /* extern "C" */ 63 | #endif 64 | 65 | #endif /* NO_MD4 */ 66 | #endif /* WOLF_CRYPT_MD4_H */ 67 | 68 | -------------------------------------------------------------------------------- /LWIP/Target/ethernetif.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : ethernetif.h 4 | * Description : This file provides initialization code for LWIP 5 | * middleWare. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | 21 | #ifndef __ETHERNETIF_H__ 22 | #define __ETHERNETIF_H__ 23 | 24 | #include "lwip/err.h" 25 | #include "lwip/netif.h" 26 | #include "cmsis_os.h" 27 | 28 | /* Exported types ------------------------------------------------------------*/ 29 | /* Structure that include link thread parameters */ 30 | struct link_str { 31 | struct netif *netif; 32 | osSemaphoreId semaphore; 33 | }; 34 | 35 | /* Within 'USER CODE' section, code will be kept by default at each generation */ 36 | /* USER CODE BEGIN 0 */ 37 | 38 | /* USER CODE END 0 */ 39 | 40 | /* Exported functions ------------------------------------------------------- */ 41 | err_t ethernetif_init(struct netif *netif); 42 | 43 | void ethernetif_input(void const * argument); 44 | void ethernetif_set_link(void const *argument); 45 | void ethernetif_update_config(struct netif *netif); 46 | void ethernetif_notify_conn_changed(struct netif *netif); 47 | 48 | u32_t sys_jiffies(void); 49 | u32_t sys_now(void); 50 | 51 | /* USER CODE BEGIN 1 */ 52 | 53 | /* USER CODE END 1 */ 54 | #endif 55 | 56 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 57 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/system/arch/init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __ARCH_INIT_H__ 33 | #define __ARCH_INIT_H__ 34 | 35 | #define TCPIP_INIT_DONE(arg) tcpip_init_done(arg) 36 | 37 | void tcpip_init_done(void *); 38 | int wait_for_tcpip_init(void); 39 | 40 | #endif /* __ARCH_INIT_H__ */ 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/arc4.h: -------------------------------------------------------------------------------- 1 | /* arc4.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/arc4.h 24 | */ 25 | 26 | #ifndef WOLF_CRYPT_ARC4_H 27 | #define WOLF_CRYPT_ARC4_H 28 | 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #ifdef WOLFSSL_ASYNC_CRYPT 36 | #include 37 | #endif 38 | 39 | enum { 40 | ARC4_ENC_TYPE = 4, /* cipher unique type */ 41 | ARC4_STATE_SIZE = 256, 42 | RC4_KEY_SIZE = 16, /* always 128bit */ 43 | }; 44 | 45 | /* ARC4 encryption and decryption */ 46 | typedef struct Arc4 { 47 | byte x; 48 | byte y; 49 | byte state[ARC4_STATE_SIZE]; 50 | #ifdef WOLFSSL_ASYNC_CRYPT 51 | WC_ASYNC_DEV asyncDev; 52 | #endif 53 | void* heap; 54 | } Arc4; 55 | 56 | WOLFSSL_API int wc_Arc4Process(Arc4*, byte*, const byte*, word32); 57 | WOLFSSL_API int wc_Arc4SetKey(Arc4*, const byte*, word32); 58 | 59 | WOLFSSL_API int wc_Arc4Init(Arc4*, void*, int); 60 | WOLFSSL_API void wc_Arc4Free(Arc4*); 61 | 62 | #ifdef __cplusplus 63 | } /* extern "C" */ 64 | #endif 65 | 66 | 67 | #endif /* WOLF_CRYPT_ARC4_H */ 68 | 69 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* rc4.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | /* rc4.h defines mini des openssl compatibility layer 25 | * 26 | */ 27 | 28 | #ifndef WOLFSSL_RC4_COMPAT_H_ 29 | #define WOLFSSL_RC4_COMPAT_H_ 30 | 31 | #include 32 | #include /* included for size_t */ 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /* applications including wolfssl/openssl/rc4.h are expecting to have access to 39 | * the size of RC4_KEY structures. */ 40 | typedef struct WOLFSSL_RC4_KEY { 41 | /* big enough for Arc4 from wolfssl/wolfcrypt/arc4.h */ 42 | void* holder[(272 + WC_ASYNC_DEV_SIZE) / sizeof(void*)]; 43 | } WOLFSSL_RC4_KEY; 44 | typedef WOLFSSL_RC4_KEY RC4_KEY; 45 | 46 | WOLFSSL_API void wolfSSL_RC4_set_key(WOLFSSL_RC4_KEY* key, int len, 47 | const unsigned char* data); 48 | WOLFSSL_API void wolfSSL_RC4(WOLFSSL_RC4_KEY* key, size_t len, 49 | const unsigned char* in, unsigned char* out); 50 | 51 | #define RC4 wolfSSL_RC4 52 | #define RC4_set_key wolfSSL_RC4_set_key 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /* WOLFSSL_RC4_COMPAT_H_ */ 59 | 60 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/rabbit.h: -------------------------------------------------------------------------------- 1 | /* rabbit.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/rabbit.h 24 | */ 25 | 26 | 27 | #ifndef WOLF_CRYPT_RABBIT_H 28 | #define WOLF_CRYPT_RABBIT_H 29 | 30 | #include 31 | 32 | #ifndef NO_RABBIT 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | 39 | enum { 40 | RABBIT_ENC_TYPE = 5 /* cipher unique type */ 41 | }; 42 | 43 | 44 | /* Rabbit Context */ 45 | typedef struct RabbitCtx { 46 | word32 x[8]; 47 | word32 c[8]; 48 | word32 carry; 49 | } RabbitCtx; 50 | 51 | 52 | /* Rabbit stream cipher */ 53 | typedef struct Rabbit { 54 | RabbitCtx masterCtx; 55 | RabbitCtx workCtx; 56 | #ifdef XSTREAM_ALIGN 57 | void* heap; /* heap hint, currently XMALLOC only used with aligning */ 58 | #endif 59 | } Rabbit; 60 | 61 | 62 | WOLFSSL_API int wc_RabbitProcess(Rabbit*, byte*, const byte*, word32); 63 | WOLFSSL_API int wc_RabbitSetKey(Rabbit*, const byte* key, const byte* iv); 64 | 65 | WOLFSSL_LOCAL int wc_Rabbit_SetHeap(Rabbit* ctx, void* heap); 66 | 67 | #ifdef __cplusplus 68 | } /* extern "C" */ 69 | #endif 70 | 71 | #endif /* NO_RABBIT */ 72 | #endif /* WOLF_CRYPT_RABBIT_H */ 73 | 74 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/ripemd.h: -------------------------------------------------------------------------------- 1 | /* ripemd.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/ripemd.h 24 | */ 25 | 26 | #ifndef WOLF_CRYPT_RIPEMD_H 27 | #define WOLF_CRYPT_RIPEMD_H 28 | 29 | #include 30 | 31 | #ifdef WOLFSSL_RIPEMD 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | 38 | /* in bytes */ 39 | enum { 40 | RIPEMD = 3, /* hash type unique */ 41 | RIPEMD_BLOCK_SIZE = 64, 42 | RIPEMD_DIGEST_SIZE = 20, 43 | RIPEMD_PAD_SIZE = 56 44 | }; 45 | 46 | 47 | /* RipeMd 160 digest */ 48 | typedef struct RipeMd { 49 | word32 buffLen; /* in bytes */ 50 | word32 loLen; /* length in bytes */ 51 | word32 hiLen; /* length in bytes */ 52 | word32 digest[RIPEMD_DIGEST_SIZE / sizeof(word32)]; 53 | word32 buffer[RIPEMD_BLOCK_SIZE / sizeof(word32)]; 54 | } RipeMd; 55 | 56 | 57 | WOLFSSL_API int wc_InitRipeMd(RipeMd*); 58 | WOLFSSL_API int wc_RipeMdUpdate(RipeMd*, const byte*, word32); 59 | WOLFSSL_API int wc_RipeMdFinal(RipeMd*, byte*); 60 | 61 | 62 | #ifdef __cplusplus 63 | } /* extern "C" */ 64 | #endif 65 | 66 | #endif /* WOLFSSL_RIPEMD */ 67 | #endif /* WOLF_CRYPT_RIPEMD_H */ 68 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/af_alg/wc_afalg.h: -------------------------------------------------------------------------------- 1 | /* wc_afalg.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_AFALG_H 24 | #define WOLFSSL_AFALG_H 25 | 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | #define WC_SOCK_NOTSET -1 33 | 34 | /* In some cases these flags are not set in AF_ALG header files. 35 | * Documentation provided at kernel.org/doc/html/v4.16/crypto/userspace-if.html 36 | * suggests using these values if not set */ 37 | #ifndef AF_ALG 38 | #define AF_ALG 38 39 | #endif 40 | #ifndef SOL_ALG 41 | #define SOL_ALG 279 42 | #endif 43 | 44 | WOLFSSL_LOCAL void wc_Afalg_SockAddr(struct sockaddr_alg* in, const char* type, const char* name); 45 | WOLFSSL_LOCAL int wc_Afalg_Accept(struct sockaddr_alg* in, int inSz, int sock); 46 | WOLFSSL_LOCAL int wc_Afalg_Socket(void); 47 | WOLFSSL_LOCAL int wc_Afalg_CreateRead(int sock, const char* type, const char* name); 48 | WOLFSSL_LOCAL int wc_Afalg_SetIv(struct cmsghdr* cmsg, byte* iv, word32 ivSz); 49 | WOLFSSL_LOCAL int wc_Afalg_SetOp(struct cmsghdr* cmsg, int dir); 50 | WOLFSSL_LOCAL int wc_Afalg_SetAad(struct cmsghdr* cmsg, word32 sz); 51 | 52 | #endif /* WOLFSSL_AFALG_H */ 53 | 54 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * NETBIOS name service responder 4 | */ 5 | 6 | /* 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 3. The name of the author may not be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 27 | * OF SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | */ 32 | #ifndef LWIP_HDR_APPS_NETBIOS_H 33 | #define LWIP_HDR_APPS_NETBIOS_H 34 | 35 | #include "lwip/apps/netbiosns_opts.h" 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | void netbiosns_init(void); 42 | #ifndef NETBIOS_LWIP_NAME 43 | void netbiosns_set_name(const char* hostname); 44 | #endif 45 | void netbiosns_stop(void); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* LWIP_HDR_APPS_NETBIOS_H */ 52 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/hc128.h: -------------------------------------------------------------------------------- 1 | /* hc128.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/hc128.h 24 | */ 25 | 26 | 27 | #ifndef WOLF_CRYPT_HC128_H 28 | #define WOLF_CRYPT_HC128_H 29 | 30 | #include 31 | 32 | #ifndef NO_HC128 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | enum { 39 | HC128_ENC_TYPE = WC_CIPHER_HC128, /* cipher unique type */ 40 | }; 41 | 42 | /* HC-128 stream cipher */ 43 | typedef struct HC128 { 44 | word32 T[1024]; /* P[i] = T[i]; Q[i] = T[1024 + i ]; */ 45 | word32 X[16]; 46 | word32 Y[16]; 47 | word32 counter1024; /* counter1024 = i mod 1024 at the ith step */ 48 | word32 key[8]; 49 | word32 iv[8]; 50 | #ifdef XSTREAM_ALIGN 51 | void* heap; /* heap hint, currently XMALLOC only used with aligning */ 52 | #endif 53 | } HC128; 54 | 55 | 56 | WOLFSSL_API int wc_Hc128_Process(HC128*, byte*, const byte*, word32); 57 | WOLFSSL_API int wc_Hc128_SetKey(HC128*, const byte* key, const byte* iv); 58 | 59 | WOLFSSL_LOCAL int wc_Hc128_SetHeap(HC128* ctx, void* heap); 60 | 61 | #ifdef __cplusplus 62 | } /* extern "C" */ 63 | #endif 64 | 65 | #endif /* HAVE_HC128 */ 66 | #endif /* WOLF_CRYPT_HC128_H */ 67 | 68 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h: -------------------------------------------------------------------------------- 1 | /* wc_devcrypto.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_DEVCRYPTO_H 24 | #define WOLFSSL_DEVCRYPTO_H 25 | 26 | #include 27 | 28 | #ifdef WOLFSSL_DEVCRYPTO 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | typedef struct WC_CRYPTODEV { 36 | int cfd; 37 | struct session_op sess; 38 | } WC_CRYPTODEV; 39 | 40 | WOLFSSL_LOCAL int wc_DevCryptoCreate(WC_CRYPTODEV* ctx, int type, byte* key, word32 keySz); 41 | WOLFSSL_LOCAL void wc_DevCryptoFree(WC_CRYPTODEV* ctx); 42 | WOLFSSL_LOCAL void wc_SetupCrypt(struct crypt_op* crt, WC_CRYPTODEV* dev, 43 | byte* src, int srcSz, byte* dst, byte* dig, int flag); 44 | WOLFSSL_LOCAL void wc_SetupCryptSym(struct crypt_op* crt, WC_CRYPTODEV* dev, 45 | byte* src, word32 srcSz, byte* dst, byte* iv, int flag); 46 | WOLFSSL_LOCAL void wc_SetupCryptAead(struct crypt_auth_op* crt, WC_CRYPTODEV* dev, 47 | byte* src, word32 srcSz, byte* dst, byte* iv, word32 ivSz, int flag, 48 | byte* authIn, word32 authInSz, byte* authTag, word32 authTagSz); 49 | 50 | #endif /* WOLFSSL_DEVCRYPTO */ 51 | #endif /* WOLFSSL_DEVCRYPTO_H */ 52 | 53 | 54 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/cpuid.h: -------------------------------------------------------------------------------- 1 | /* cpuid.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | #ifndef WOLF_CRYPT_CPUID_H 25 | #define WOLF_CRYPT_CPUID_H 26 | 27 | 28 | #include 29 | 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #if defined(WOLFSSL_X86_64_BUILD) || defined(USE_INTEL_SPEEDUP) || \ 36 | defined(WOLFSSL_AESNI) 37 | #define CPUID_AVX1 0x0001 38 | #define CPUID_AVX2 0x0002 39 | #define CPUID_RDRAND 0x0004 40 | #define CPUID_RDSEED 0x0008 41 | #define CPUID_BMI2 0x0010 /* MULX, RORX */ 42 | #define CPUID_AESNI 0x0020 43 | #define CPUID_ADX 0x0040 /* ADCX, ADOX */ 44 | 45 | #define IS_INTEL_AVX1(f) ((f) & CPUID_AVX1) 46 | #define IS_INTEL_AVX2(f) ((f) & CPUID_AVX2) 47 | #define IS_INTEL_RDRAND(f) ((f) & CPUID_RDRAND) 48 | #define IS_INTEL_RDSEED(f) ((f) & CPUID_RDSEED) 49 | #define IS_INTEL_BMI2(f) ((f) & CPUID_BMI2) 50 | #define IS_INTEL_AESNI(f) ((f) & CPUID_AESNI) 51 | #define IS_INTEL_ADX(f) ((f) & CPUID_ADX) 52 | 53 | void cpuid_set_flags(void); 54 | word32 cpuid_get_flags(void); 55 | #endif 56 | 57 | #ifdef __cplusplus 58 | } /* extern "C" */ 59 | #endif 60 | 61 | 62 | #endif /* WOLF_CRYPT_CPUID_H */ 63 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/objects.h: -------------------------------------------------------------------------------- 1 | /* objects.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLFSSL_OBJECTS_H_ 24 | #define WOLFSSL_OBJECTS_H_ 25 | 26 | #include 27 | //#include 28 | #ifndef OPENSSL_EXTRA_SSL_GUARD 29 | #define OPENSSL_EXTRA_SSL_GUARD 30 | #include 31 | #endif /* OPENSSL_EXTRA_SSL_GUARD */ 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | #define OBJ_nid2sn wolfSSL_OBJ_nid2sn 38 | #define OBJ_obj2nid wolfSSL_OBJ_obj2nid 39 | #define OBJ_sn2nid wolfSSL_OBJ_sn2nid 40 | #define OBJ_nid2ln wolfSSL_OBJ_nid2ln 41 | #define OBJ_ln2nid wolfSSL_OBJ_ln2nid 42 | #define OBJ_txt2nid wolfSSL_OBJ_txt2nid 43 | #define OBJ_txt2obj wolfSSL_OBJ_txt2obj 44 | #define OBJ_nid2obj wolfSSL_OBJ_nid2obj 45 | #define OBJ_obj2txt wolfSSL_OBJ_obj2txt 46 | #define OBJ_cleanup wolfSSL_OBJ_cleanup 47 | #define OBJ_cmp wolfSSL_OBJ_cmp 48 | #define OBJ_create wolfSSL_OBJ_create 49 | #define ASN1_OBJECT_free wolfSSL_ASN1_OBJECT_free 50 | 51 | /* not required for wolfSSL */ 52 | #define OPENSSL_load_builtin_modules() 53 | 54 | 55 | #define NID_ad_OCSP 178 56 | #define NID_ad_ca_issuers 179 57 | 58 | 59 | #ifdef __cplusplus 60 | } /* extern "C" */ 61 | #endif 62 | 63 | #endif /* WOLFSSL_OBJECTS_H_ */ 64 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/apps/smtp_opts.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_APPS_SMTP_OPTS_H 2 | #define LWIP_HDR_APPS_SMTP_OPTS_H 3 | 4 | #include "lwip/opt.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /** 11 | * @defgroup smtp_opts Options 12 | * @ingroup smtp 13 | * 14 | * @{ 15 | */ 16 | 17 | /** Set this to 1 to enable data handler callback on BODY */ 18 | #ifndef SMTP_BODYDH 19 | #define SMTP_BODYDH 0 20 | #endif 21 | 22 | /** SMTP_DEBUG: Enable debugging for SNTP. */ 23 | #ifndef SMTP_DEBUG 24 | #define SMTP_DEBUG LWIP_DBG_OFF 25 | #endif 26 | 27 | /** Maximum length reserved for server name including terminating 0 byte */ 28 | #ifndef SMTP_MAX_SERVERNAME_LEN 29 | #define SMTP_MAX_SERVERNAME_LEN 256 30 | #endif 31 | 32 | /** Maximum length reserved for username */ 33 | #ifndef SMTP_MAX_USERNAME_LEN 34 | #define SMTP_MAX_USERNAME_LEN 32 35 | #endif 36 | 37 | /** Maximum length reserved for password */ 38 | #ifndef SMTP_MAX_PASS_LEN 39 | #define SMTP_MAX_PASS_LEN 32 40 | #endif 41 | 42 | /** Set this to 0 if you know the authentication data will not change 43 | * during the smtp session, which saves some heap space. */ 44 | #ifndef SMTP_COPY_AUTHDATA 45 | #define SMTP_COPY_AUTHDATA 1 46 | #endif 47 | 48 | /** Set this to 0 to save some code space if you know for sure that all data 49 | * passed to this module conforms to the requirements in the SMTP RFC. 50 | * WARNING: use this with care! 51 | */ 52 | #ifndef SMTP_CHECK_DATA 53 | #define SMTP_CHECK_DATA 1 54 | #endif 55 | 56 | /** Set this to 1 to enable AUTH PLAIN support */ 57 | #ifndef SMTP_SUPPORT_AUTH_PLAIN 58 | #define SMTP_SUPPORT_AUTH_PLAIN 1 59 | #endif 60 | 61 | /** Set this to 1 to enable AUTH LOGIN support */ 62 | #ifndef SMTP_SUPPORT_AUTH_LOGIN 63 | #define SMTP_SUPPORT_AUTH_LOGIN 1 64 | #endif 65 | 66 | /* Memory allocation/deallocation can be overridden... */ 67 | #ifndef SMTP_STATE_MALLOC 68 | #define SMTP_STATE_MALLOC(size) mem_malloc(size) 69 | #define SMTP_STATE_FREE(ptr) mem_free(ptr) 70 | #endif 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif /* SMTP_OPTS_H */ 81 | 82 | -------------------------------------------------------------------------------- /Core/Src/rng.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : RNG.c 4 | * Description : This file provides code for the configuration 5 | * of the RNG instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "rng.h" 22 | 23 | /* USER CODE BEGIN 0 */ 24 | 25 | /* USER CODE END 0 */ 26 | 27 | RNG_HandleTypeDef hrng; 28 | 29 | /* RNG init function */ 30 | void MX_RNG_Init(void) 31 | { 32 | 33 | hrng.Instance = RNG; 34 | if (HAL_RNG_Init(&hrng) != HAL_OK) 35 | { 36 | Error_Handler(); 37 | } 38 | 39 | } 40 | 41 | void HAL_RNG_MspInit(RNG_HandleTypeDef* rngHandle) 42 | { 43 | 44 | if(rngHandle->Instance==RNG) 45 | { 46 | /* USER CODE BEGIN RNG_MspInit 0 */ 47 | 48 | /* USER CODE END RNG_MspInit 0 */ 49 | /* RNG clock enable */ 50 | __HAL_RCC_RNG_CLK_ENABLE(); 51 | /* USER CODE BEGIN RNG_MspInit 1 */ 52 | 53 | /* USER CODE END RNG_MspInit 1 */ 54 | } 55 | } 56 | 57 | void HAL_RNG_MspDeInit(RNG_HandleTypeDef* rngHandle) 58 | { 59 | 60 | if(rngHandle->Instance==RNG) 61 | { 62 | /* USER CODE BEGIN RNG_MspDeInit 0 */ 63 | 64 | /* USER CODE END RNG_MspDeInit 0 */ 65 | /* Peripheral clock disable */ 66 | __HAL_RCC_RNG_CLK_DISABLE(); 67 | /* USER CODE BEGIN RNG_MspDeInit 1 */ 68 | 69 | /* USER CODE END RNG_MspDeInit 1 */ 70 | } 71 | } 72 | 73 | /* USER CODE BEGIN 1 */ 74 | 75 | /* USER CODE END 1 */ 76 | 77 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 78 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/test/README.md: -------------------------------------------------------------------------------- 1 | # wolfCrypt Test 2 | 3 | Tool for performing cryptographic algorithm testing. 4 | 5 | ## Example Output 6 | 7 | Run on Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz. 8 | 9 | ```sh 10 | ./configure --enable-intelasm --enable-aesni --enable-sp --enable-sp-asm && make 11 | 12 | ./wolfcrypt/test/testwolfcrypt 13 | ------------------------------------------------------------------------------ 14 | wolfSSL version 4.0.0 15 | ------------------------------------------------------------------------------ 16 | error test passed! 17 | MEMORY test passed! 18 | base64 test passed! 19 | asn test passed! 20 | MD5 test passed! 21 | SHA test passed! 22 | SHA-224 test passed! 23 | SHA-256 test passed! 24 | SHA-384 test passed! 25 | SHA-512 test passed! 26 | SHA-3 test passed! 27 | Hash test passed! 28 | HMAC-MD5 test passed! 29 | HMAC-SHA test passed! 30 | HMAC-SHA224 test passed! 31 | HMAC-SHA256 test passed! 32 | HMAC-SHA384 test passed! 33 | HMAC-SHA512 test passed! 34 | HMAC-SHA3 test passed! 35 | GMAC test passed! 36 | Chacha test passed! 37 | POLY1305 test passed! 38 | ChaCha20-Poly1305 AEAD test passed! 39 | AES test passed! 40 | AES192 test passed! 41 | AES256 test passed! 42 | AES-GCM test passed! 43 | RANDOM test passed! 44 | RSA test passed! 45 | DH test passed! 46 | ECC test passed! 47 | logging test passed! 48 | mutex test passed! 49 | memcb test passed! 50 | Test complete 51 | ``` 52 | 53 | 54 | ## Windows Visual Studio 55 | 56 | For building wolfCrypt test project in Visual Studio open the `test.sln`. For newer Visual Studio version it may prompt for a one-way upgrade. Then you may have to right-click on the solution and choose `Retarget solution` to update the project files for your Visual Studio version. 57 | 58 | If you see an error about `rc.exe` then you'll need to update the "Target Platform Version". You can do this by right-clicking on the test project -> General -> "Target Platform Version" and changing to 8.1 (needs to match the wolfssl library project). 59 | 60 | This solution includes the wolfSSL library project at `wolfssl.vcxproj` and will compile the library, then the test project. 61 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/port/Espressif/esp32_util.c: -------------------------------------------------------------------------------- 1 | /* esp32_util.c 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | #include 22 | 23 | #if defined(WOLFSSL_ESP32WROOM32_CRYPT) && \ 24 | (!defined(NO_AES) || !defined(NO_SHA) || !defined(NO_SHA256) ||\ 25 | defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512)) 26 | 27 | #include 28 | #include 29 | 30 | int esp_CryptHwMutexInit(wolfSSL_Mutex* mutex) { 31 | return wc_InitMutex(mutex); 32 | } 33 | 34 | int esp_CryptHwMutexLock(wolfSSL_Mutex* mutex, TickType_t xBlockTime) { 35 | #ifdef SINGLE_THREADED 36 | return wc_LockMutex(mutex); 37 | #else 38 | return ((xSemaphoreTake( *mutex, xBlockTime ) == pdTRUE) ? 0 : BAD_MUTEX_E); 39 | #endif 40 | } 41 | 42 | int esp_CryptHwMutexUnLock(wolfSSL_Mutex* mutex) { 43 | return wc_UnLockMutex(mutex); 44 | } 45 | 46 | #endif 47 | 48 | #ifdef WOLFSSL_ESP32WROOM32_CRYPT_DEBUG 49 | 50 | #include "esp_timer.h" 51 | #include "esp_log.h" 52 | 53 | static uint64_t startTime = 0; 54 | 55 | 56 | void wc_esp32TimerStart() 57 | { 58 | startTime = esp_timer_get_time(); 59 | } 60 | 61 | uint64_t wc_esp32elapsedTime() 62 | { 63 | /* return elapsed time since wc_esp32AesTimeStart() is called in us */ 64 | return esp_timer_get_time() - startTime; 65 | } 66 | 67 | #endif /*WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */ 68 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * INET v6 addresses. 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2010 Inico Technologies Ltd. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Ivan Delamer 36 | * 37 | * 38 | * Please coordinate changes and requests with Ivan Delamer 39 | * 40 | */ 41 | 42 | #include "lwip/opt.h" 43 | 44 | #if LWIP_IPV6 && LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ 45 | 46 | #include "lwip/def.h" 47 | #include "lwip/inet.h" 48 | 49 | /** This variable is initialized by the system to contain the wildcard IPv6 address. 50 | */ 51 | const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; 52 | 53 | #endif /* LWIP_IPV6 */ 54 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/netif/ppp/ecp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ecp.h - Definitions for PPP Encryption Control Protocol. 3 | * 4 | * Copyright (c) 2002 Google, Inc. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 14 | * 2. Redistributions in binary form must reproduce the above copyright 15 | * notice, this list of conditions and the following disclaimer in 16 | * the documentation and/or other materials provided with the 17 | * distribution. 18 | * 19 | * 3. The name(s) of the authors of this software must not be used to 20 | * endorse or promote products derived from this software without 21 | * prior written permission. 22 | * 23 | * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO 24 | * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 25 | * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY 26 | * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 27 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 28 | * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 29 | * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 30 | * 31 | * $Id: ecp.h,v 1.2 2003/01/10 07:12:36 fcusack Exp $ 32 | */ 33 | 34 | #include "netif/ppp/ppp_opts.h" 35 | #if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */ 36 | 37 | #ifndef ECP_H 38 | #define ECP_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef struct ecp_options { 45 | bool required; /* Is ECP required? */ 46 | unsigned enctype; /* Encryption type */ 47 | } ecp_options; 48 | 49 | extern fsm ecp_fsm[]; 50 | extern ecp_options ecp_wantoptions[]; 51 | extern ecp_options ecp_gotoptions[]; 52 | extern ecp_options ecp_allowoptions[]; 53 | extern ecp_options ecp_hisoptions[]; 54 | 55 | extern const struct protent ecp_protent; 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif /* ECP_H */ 62 | #endif /* PPP_SUPPORT && ECP_SUPPORT */ 63 | -------------------------------------------------------------------------------- /Core/Inc/stm32f7xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f7xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F7xx_IT_H 23 | #define __STM32F7xx_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Private includes ----------------------------------------------------------*/ 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | /* USER CODE BEGIN ET */ 36 | 37 | /* USER CODE END ET */ 38 | 39 | /* Exported constants --------------------------------------------------------*/ 40 | /* USER CODE BEGIN EC */ 41 | 42 | /* USER CODE END EC */ 43 | 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* USER CODE BEGIN EM */ 46 | 47 | /* USER CODE END EM */ 48 | 49 | /* Exported functions prototypes ---------------------------------------------*/ 50 | void NMI_Handler(void); 51 | void HardFault_Handler(void); 52 | void MemManage_Handler(void); 53 | void BusFault_Handler(void); 54 | void UsageFault_Handler(void); 55 | void DebugMon_Handler(void); 56 | void TIM1_UP_TIM10_IRQHandler(void); 57 | void ETH_IRQHandler(void); 58 | /* USER CODE BEGIN EFP */ 59 | 60 | /* USER CODE END EFP */ 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif /* __STM32F7xx_IT_H */ 67 | 68 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 69 | -------------------------------------------------------------------------------- /Bsp/bsp_dhcp.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------- 2 | * Includes files 3 | *----------------------------------------------------------*/ 4 | 5 | /* bsp includes. */ 6 | #include "FreeRTOS.h" 7 | #include "timers.h" 8 | 9 | /* bsp includes. */ 10 | #include "lwip/dhcp.h" 11 | #include "lwip/dns.h" 12 | #include "lwip/apps/netbiosns.h" 13 | 14 | /* bsp includes. */ 15 | #include "bsp_printlog.h" 16 | 17 | // 最大 DHCP 次数,设置一个 大点的值 18 | #define MAX_DHCP_COUNT (50000) 19 | 20 | /*! 21 | * @brief 封装 dhcp 接口 22 | * 执行条件:无 23 | * 24 | * @retval: 无 25 | */ 26 | err_t bsp_dhcp(void) 27 | { 28 | struct dhcp *dhcp; 29 | uint32_t over_time = 0; 30 | 31 | struct netif *netif_p = netif_default; 32 | 33 | if(netif_p == NULL) 34 | { 35 | return ERR_VAL; 36 | } 37 | 38 | /* Start DHCP negotiation for a network interface (IPv4) */ 39 | // dhcp_start(netif); 40 | 41 | //设置计算机名 (测试方法: (1)ping 计算机名 (2)用浏览器访问 http://计算机名/) 42 | 43 | netif_p->hostname = "THOSTP"; //设置 Host Name 44 | 45 | netbiosns_init(); 46 | netbiosns_set_name(netif_p->hostname); 47 | 48 | // 外部定义了 netif_default 49 | while(!dhcp_supplied_address(netif_p)) 50 | { 51 | over_time++; 52 | print_log("dhcp_connect: DHCP discovering... for %d times\r\n", over_time); 53 | 54 | if(over_time > MAX_DHCP_COUNT) 55 | { 56 | print_log("dhcp_connect: overtime, not doing dhcp\r\n"); 57 | return ERR_TIMEOUT; 58 | } 59 | vTaskDelay(pdMS_TO_TICKS(500)); 60 | } 61 | 62 | dhcp = netif_dhcp_data(netif_p); 63 | print_log("DHCP IP address: %s\n", ip4addr_ntoa(&dhcp->offered_ip_addr)); 64 | print_log("DHCP Subnet mask: %s\n", ip4addr_ntoa(&dhcp->offered_sn_mask)); 65 | print_log("DHCP Default gateway: %s\n", ip4addr_ntoa(&dhcp->offered_gw_addr)); 66 | 67 | #if LWIP_DNS 68 | print_log("DHCP DNS Server: %s\n", ip4addr_ntoa(dns_getserver(0))); 69 | 70 | #ifdef DNS_SERVER_ADDRESS 71 | /* initialize default DNS server address */ 72 | ip_addr_t dnsserver; 73 | DNS_SERVER_ADDRESS(&dnsserver); 74 | dns_setserver(0, &dnsserver); 75 | #endif /* DNS_SERVER_ADDRESS */ 76 | 77 | print_log("after set DHCP DNS Server: %s\n", ip4addr_ntoa(dns_getserver(0))); 78 | #endif 79 | 80 | print_log("dhcp_connect: DHCP success\r\n"); 81 | 82 | return ERR_OK; 83 | } 84 | 85 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.c: -------------------------------------------------------------------------------- 1 | /* 2 | * eui64.c - EUI64 routines for IPv6CP. 3 | * 4 | * Copyright (c) 1999 Tommi Komulainen. All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in 15 | * the documentation and/or other materials provided with the 16 | * distribution. 17 | * 18 | * 3. The name(s) of the authors of this software must not be used to 19 | * endorse or promote products derived from this software without 20 | * prior written permission. 21 | * 22 | * 4. Redistributions of any form whatsoever must retain the following 23 | * acknowledgment: 24 | * "This product includes software developed by Tommi Komulainen 25 | * ". 26 | * 27 | * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO 28 | * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 29 | * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY 30 | * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 31 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 32 | * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 33 | * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 34 | * 35 | * $Id: eui64.c,v 1.6 2002/12/04 23:03:32 paulus Exp $ 36 | */ 37 | 38 | #include "netif/ppp/ppp_opts.h" 39 | #if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ 40 | 41 | #include "netif/ppp/ppp_impl.h" 42 | #include "netif/ppp/eui64.h" 43 | 44 | /* 45 | * eui64_ntoa - Make an ascii representation of an interface identifier 46 | */ 47 | char *eui64_ntoa(eui64_t e) { 48 | static char buf[20]; 49 | 50 | sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x", 51 | e.e8[0], e.e8[1], e.e8[2], e.e8[3], 52 | e.e8[4], e.e8[5], e.e8[6], e.e8[7]); 53 | return buf; 54 | } 55 | 56 | #endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ 57 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/err.h: -------------------------------------------------------------------------------- 1 | /* err.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | #ifndef WOLFSSL_OPENSSL_ERR_ 23 | #define WOLFSSL_OPENSSL_ERR_ 24 | 25 | #include 26 | 27 | /* err.h for openssl */ 28 | #define ERR_load_crypto_strings wolfSSL_ERR_load_crypto_strings 29 | #define ERR_load_CRYPTO_strings wolfSSL_ERR_load_crypto_strings 30 | #define ERR_peek_last_error wolfSSL_ERR_peek_last_error 31 | 32 | /* fatal error */ 33 | #define ERR_R_MALLOC_FAILURE MEMORY_E 34 | #define ERR_R_PASSED_NULL_PARAMETER BAD_FUNC_ARG 35 | #define ERR_R_DISABLED NOT_COMPILED_IN 36 | #define ERR_R_PASSED_INVALID_ARGUMENT BAD_FUNC_ARG 37 | #define RSA_R_UNKNOWN_PADDING_TYPE RSA_PAD_E 38 | #define EC_R_BUFFER_TOO_SMALL BUFFER_E 39 | 40 | /* SSL function codes */ 41 | #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT 1 42 | #define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 2 43 | #define SSL_F_SSL_USE_PRIVATEKEY 3 44 | #define EC_F_EC_GFP_SIMPLE_POINT2OCT 4 45 | 46 | /* reasons */ 47 | #define ERR_R_SYS_LIB 1 48 | #define PKCS12_R_MAC_VERIFY_FAILURE 2 49 | 50 | #define RSAerr(f,r) ERR_put_error(0,(f),(r),__FILE__,__LINE__) 51 | #define SSLerr(f,r) ERR_put_error(0,(f),(r),__FILE__,__LINE__) 52 | #define ECerr(f,r) ERR_put_error(0,(f),(r),__FILE__,__LINE__) 53 | 54 | #endif /* WOLFSSL_OPENSSL_ERR_ */ 55 | 56 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/caam/wolfcaam.h: -------------------------------------------------------------------------------- 1 | /* wolfcaam.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | #ifndef WOLF_CRYPT_CAAM_INIT_H 23 | #define WOLF_CRYPT_CAAM_INIT_H 24 | 25 | #include 26 | 27 | #if defined(WOLFSSL_IMX6_CAAM) || defined(WOLFSSL_IMX6_CAAM_RNG) 28 | 29 | #include 30 | 31 | #if defined(__INTEGRITY) || defined(INTEGRITY) 32 | #include 33 | #endif 34 | 35 | WOLFSSL_LOCAL int wc_caamInit(void); 36 | WOLFSSL_LOCAL int wc_caamFree(void); 37 | WOLFSSL_LOCAL int wc_caamInitRng(void); 38 | WOLFSSL_LOCAL int wc_caamFreeRng(void); 39 | 40 | WOLFSSL_LOCAL word32 wc_caamReadRegister(word32 reg); 41 | WOLFSSL_LOCAL void wc_caamWriteRegister(word32 reg, word32 value); 42 | WOLFSSL_LOCAL int wc_caamAddAndWait(Buffer* buf, word32 arg[4], word32 type); 43 | 44 | WOLFSSL_API int wc_caamSetResource(IODevice ioDev); 45 | 46 | WOLFSSL_API int wc_caamOpenBlob(byte* data, word32 dataSz, byte* out, 47 | word32* outSz); 48 | WOLFSSL_API int wc_caamCreateBlob(byte* data, word32 dataSz, byte* out, 49 | word32* outSz); 50 | 51 | /* additional size that is added by CAAM when creating a blob */ 52 | #define WC_CAAM_BLOB_SZ 48 53 | 54 | #ifndef WC_CAAM_READ 55 | #define WC_CAAM_READ(reg) wc_caamReadRegister((reg)) 56 | #endif 57 | #ifndef WC_CAAM_WRITE 58 | #define WC_CAAM_WRITE(reg, x) wc_caamWriteRegister((reg), (x)) 59 | #endif 60 | 61 | #endif /* WOLFSSL_IMX6_CAAM */ 62 | 63 | #endif /* WOLF_CRYPT_CAAM_INIT_H */ 64 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * IP protocol definitions 4 | */ 5 | 6 | /* 7 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, 11 | * are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, 16 | * this list of conditions and the following disclaimer in the documentation 17 | * and/or other materials provided with the distribution. 18 | * 3. The name of the author may not be used to endorse or promote products 19 | * derived from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 24 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 26 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 29 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 30 | * OF SUCH DAMAGE. 31 | * 32 | * This file is part of the lwIP TCP/IP stack. 33 | * 34 | * Author: Adam Dunkels 35 | * 36 | */ 37 | #ifndef LWIP_HDR_PROT_IP_H 38 | #define LWIP_HDR_PROT_IP_H 39 | 40 | #include "lwip/arch.h" 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | #define IP_PROTO_ICMP 1 47 | #define IP_PROTO_IGMP 2 48 | #define IP_PROTO_UDP 17 49 | #define IP_PROTO_UDPLITE 136 50 | #define IP_PROTO_TCP 6 51 | 52 | /** This operates on a void* by loading the first byte */ 53 | #define IP_HDR_GET_VERSION(ptr) ((*(u8_t*)(ptr)) >> 4) 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* LWIP_HDR_PROT_IP_H */ 60 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/stack.h: -------------------------------------------------------------------------------- 1 | /* stack.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* stack.h for openSSL */ 23 | 24 | #ifndef WOLFSSL_STACK_H_ 25 | #define WOLFSSL_STACK_H_ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | typedef void (*wolfSSL_sk_freefunc)(void *); 32 | 33 | WOLFSSL_API void wolfSSL_sk_GENERIC_pop_free(WOLFSSL_STACK* sk, wolfSSL_sk_freefunc); 34 | WOLFSSL_API void wolfSSL_sk_GENERIC_free(WOLFSSL_STACK *); 35 | WOLFSSL_API int wolfSSL_sk_GENERIC_push(WOLFSSL_STACK *sk, void *data); 36 | WOLFSSL_API void wolfSSL_sk_pop_free(WOLFSSL_STACK *st, void (*func) (void *)); 37 | WOLFSSL_API void wolfSSL_sk_CONF_VALUE_free(WOLF_STACK_OF(WOLFSSL_CONF_VALUE)* sk); 38 | WOLFSSL_API WOLFSSL_STACK *wolfSSL_sk_new_null(void); 39 | 40 | WOLFSSL_API int wolfSSL_sk_CIPHER_push(WOLFSSL_STACK *st,WOLFSSL_CIPHER *cipher); 41 | WOLFSSL_API WOLFSSL_CIPHER* wolfSSL_sk_CIPHER_pop(WOLF_STACK_OF(WOLFSSL_CIPHER)* sk); 42 | WOLFSSL_API WOLFSSL_STACK* wolfSSL_sk_new_cipher(void); 43 | 44 | #define OPENSSL_sk_free wolfSSL_sk_free 45 | #define OPENSSL_sk_pop_free wolfSSL_sk_pop_free 46 | #define OPENSSL_sk_new_null wolfSSL_sk_new_null 47 | #define OPENSSL_sk_push wolfSSL_sk_push 48 | 49 | /* provides older OpenSSL API compatibility */ 50 | #define sk_free OPENSSL_sk_free 51 | #define sk_pop_free OPENSSL_sk_pop_free 52 | #define sk_new_null OPENSSL_sk_new_null 53 | #define sk_push OPENSSL_sk_push 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /LWIP/App/lwip.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : LWIP.h 4 | * Description : This file provides code for the configuration 5 | * of the LWIP. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ************************************************************************* 18 | 19 | */ 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __mx_lwip_H 22 | #define __mx_lwip_H 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | #include "lwip/opt.h" 29 | #include "lwip/mem.h" 30 | #include "lwip/memp.h" 31 | #include "netif/etharp.h" 32 | #include "lwip/dhcp.h" 33 | #include "lwip/netif.h" 34 | #include "lwip/timeouts.h" 35 | #include "ethernetif.h" 36 | 37 | /* Includes for RTOS ---------------------------------------------------------*/ 38 | #if WITH_RTOS 39 | #include "lwip/tcpip.h" 40 | #endif /* WITH_RTOS */ 41 | 42 | /* USER CODE BEGIN 0 */ 43 | 44 | /* USER CODE END 0 */ 45 | 46 | /* Global Variables ----------------------------------------------------------*/ 47 | extern ETH_HandleTypeDef heth; 48 | 49 | /* LWIP init function */ 50 | void MX_LWIP_Init(void); 51 | 52 | #if !WITH_RTOS 53 | /* USER CODE BEGIN 1 */ 54 | /* Function defined in lwip.c to: 55 | * - Read a received packet from the Ethernet buffers 56 | * - Send it to the lwIP stack for handling 57 | * - Handle timeouts if NO_SYS_NO_TIMERS not set 58 | */ 59 | void MX_LWIP_Process(void); 60 | 61 | /* USER CODE END 1 */ 62 | #endif /* WITH_RTOS */ 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #endif /*__ mx_lwip_H */ 68 | 69 | /** 70 | * @} 71 | */ 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 78 | -------------------------------------------------------------------------------- /Core/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __MAIN_H 24 | #define __MAIN_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f7xx_hal.h" 32 | #include "stm32f7xx_hal.h" 33 | 34 | /* Private includes ----------------------------------------------------------*/ 35 | /* USER CODE BEGIN Includes */ 36 | 37 | /* USER CODE END Includes */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* USER CODE BEGIN ET */ 41 | 42 | /* USER CODE END ET */ 43 | 44 | /* Exported constants --------------------------------------------------------*/ 45 | /* USER CODE BEGIN EC */ 46 | 47 | /* USER CODE END EC */ 48 | 49 | /* Exported macro ------------------------------------------------------------*/ 50 | /* USER CODE BEGIN EM */ 51 | 52 | /* USER CODE END EM */ 53 | 54 | /* Exported functions prototypes ---------------------------------------------*/ 55 | void Error_Handler(void); 56 | 57 | /* USER CODE BEGIN EFP */ 58 | 59 | /* USER CODE END EFP */ 60 | 61 | /* Private defines -----------------------------------------------------------*/ 62 | /* USER CODE BEGIN Private defines */ 63 | 64 | /* USER CODE END Private defines */ 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif /* __MAIN_H */ 71 | 72 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 73 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* md5.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /* md5.h for openssl */ 23 | 24 | 25 | #ifndef WOLFSSL_MD5_H_ 26 | #define WOLFSSL_MD5_H_ 27 | 28 | #include 29 | 30 | #ifndef NO_MD5 31 | 32 | #include 33 | 34 | #ifdef WOLFSSL_PREFIX 35 | #include "prefix_md5.h" 36 | #endif 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | 43 | typedef struct WOLFSSL_MD5_CTX { 44 | /* big enough to hold wolfcrypt md5, but check on init */ 45 | #ifdef STM32_HASH 46 | void* holder[(112 + WC_ASYNC_DEV_SIZE + sizeof(STM32_HASH_Context)) / sizeof(void*)]; 47 | #else 48 | void* holder[(112 + WC_ASYNC_DEV_SIZE) / sizeof(void*)]; 49 | #endif 50 | } WOLFSSL_MD5_CTX; 51 | 52 | WOLFSSL_API int wolfSSL_MD5_Init(WOLFSSL_MD5_CTX*); 53 | WOLFSSL_API int wolfSSL_MD5_Update(WOLFSSL_MD5_CTX*, const void*, unsigned long); 54 | WOLFSSL_API int wolfSSL_MD5_Final(unsigned char*, WOLFSSL_MD5_CTX*); 55 | 56 | 57 | typedef WOLFSSL_MD5_CTX MD5_CTX; 58 | 59 | #define MD5_Init wolfSSL_MD5_Init 60 | #define MD5_Update wolfSSL_MD5_Update 61 | #define MD5_Final wolfSSL_MD5_Final 62 | 63 | #ifdef OPENSSL_EXTRA_BSD 64 | #define MD5Init wolfSSL_MD5_Init 65 | #define MD5Update wolfSSL_MD5_Update 66 | #define MD5Final wolfSSL_MD5_Final 67 | #endif 68 | 69 | #ifndef MD5 70 | #define MD5(d, n, md) wc_Md5Hash((d), (n), (md)) 71 | #endif 72 | 73 | #define MD5_DIGEST_LENGTH MD5_DIGEST_SIZE 74 | 75 | #ifdef __cplusplus 76 | } /* extern "C" */ 77 | #endif 78 | 79 | #endif /* NO_MD5 */ 80 | 81 | #endif /* WOLFSSL_MD5_H_ */ 82 | -------------------------------------------------------------------------------- /Core/Src/rtc.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * File Name : RTC.c 4 | * Description : This file provides code for the configuration 5 | * of the RTC instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2020 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under Ultimate Liberty license 13 | * SLA0044, the "License"; You may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at: 15 | * www.st.com/SLA0044 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "rtc.h" 22 | 23 | /* USER CODE BEGIN 0 */ 24 | 25 | /* USER CODE END 0 */ 26 | 27 | RTC_HandleTypeDef hrtc; 28 | 29 | /* RTC init function */ 30 | void MX_RTC_Init(void) 31 | { 32 | 33 | /** Initialize RTC Only 34 | */ 35 | hrtc.Instance = RTC; 36 | hrtc.Init.HourFormat = RTC_HOURFORMAT_24; 37 | hrtc.Init.AsynchPrediv = 127; 38 | hrtc.Init.SynchPrediv = 255; 39 | hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; 40 | hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; 41 | hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; 42 | if (HAL_RTC_Init(&hrtc) != HAL_OK) 43 | { 44 | Error_Handler(); 45 | } 46 | 47 | } 48 | 49 | void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle) 50 | { 51 | 52 | if(rtcHandle->Instance==RTC) 53 | { 54 | /* USER CODE BEGIN RTC_MspInit 0 */ 55 | 56 | /* USER CODE END RTC_MspInit 0 */ 57 | /* RTC clock enable */ 58 | __HAL_RCC_RTC_ENABLE(); 59 | /* USER CODE BEGIN RTC_MspInit 1 */ 60 | 61 | /* USER CODE END RTC_MspInit 1 */ 62 | } 63 | } 64 | 65 | void HAL_RTC_MspDeInit(RTC_HandleTypeDef* rtcHandle) 66 | { 67 | 68 | if(rtcHandle->Instance==RTC) 69 | { 70 | /* USER CODE BEGIN RTC_MspDeInit 0 */ 71 | 72 | /* USER CODE END RTC_MspDeInit 0 */ 73 | /* Peripheral clock disable */ 74 | __HAL_RCC_RTC_DISABLE(); 75 | /* USER CODE BEGIN RTC_MspDeInit 1 */ 76 | 77 | /* USER CODE END RTC_MspDeInit 1 */ 78 | } 79 | } 80 | 81 | /* USER CODE BEGIN 1 */ 82 | 83 | /* USER CODE END 1 */ 84 | 85 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 86 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/ethip6.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * Ethernet output for IPv6. Uses ND tables for link-layer addressing. 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2010 Inico Technologies Ltd. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Ivan Delamer 36 | * 37 | * 38 | * Please coordinate changes and requests with Ivan Delamer 39 | * 40 | */ 41 | 42 | #ifndef LWIP_HDR_ETHIP6_H 43 | #define LWIP_HDR_ETHIP6_H 44 | 45 | #include "lwip/opt.h" 46 | 47 | #if LWIP_IPV6 && LWIP_ETHERNET /* don't build if not configured for use in lwipopts.h */ 48 | 49 | #include "lwip/pbuf.h" 50 | #include "lwip/ip6.h" 51 | #include "lwip/ip6_addr.h" 52 | #include "lwip/netif.h" 53 | 54 | 55 | #ifdef __cplusplus 56 | extern "C" { 57 | #endif 58 | 59 | 60 | err_t ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr); 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif /* LWIP_IPV6 && LWIP_ETHERNET */ 67 | 68 | #endif /* LWIP_HDR_ETHIP6_H */ 69 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/prot/udp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * UDP protocol definitions 4 | */ 5 | 6 | /* 7 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, 11 | * are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, 16 | * this list of conditions and the following disclaimer in the documentation 17 | * and/or other materials provided with the distribution. 18 | * 3. The name of the author may not be used to endorse or promote products 19 | * derived from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 24 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 26 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 29 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 30 | * OF SUCH DAMAGE. 31 | * 32 | * This file is part of the lwIP TCP/IP stack. 33 | * 34 | * Author: Adam Dunkels 35 | * 36 | */ 37 | #ifndef LWIP_HDR_PROT_UDP_H 38 | #define LWIP_HDR_PROT_UDP_H 39 | 40 | #include "lwip/arch.h" 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | #define UDP_HLEN 8 47 | 48 | /* Fields are (of course) in network byte order. */ 49 | #ifdef PACK_STRUCT_USE_INCLUDES 50 | # include "arch/bpstruct.h" 51 | #endif 52 | PACK_STRUCT_BEGIN 53 | struct udp_hdr { 54 | PACK_STRUCT_FIELD(u16_t src); 55 | PACK_STRUCT_FIELD(u16_t dest); /* src/dest UDP ports */ 56 | PACK_STRUCT_FIELD(u16_t len); 57 | PACK_STRUCT_FIELD(u16_t chksum); 58 | } PACK_STRUCT_STRUCT; 59 | PACK_STRUCT_END 60 | #ifdef PACK_STRUCT_USE_INCLUDES 61 | # include "arch/epstruct.h" 62 | #endif 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif /* LWIP_HDR_PROT_UDP_H */ 69 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/fp_sqr_comba_4.i: -------------------------------------------------------------------------------- 1 | /* fp_sqr_comba_4.i 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | #ifdef TFM_SQR4 25 | int fp_sqr_comba4(fp_int *A, fp_int *B) 26 | { 27 | fp_digit *a, c0, c1, c2; 28 | #ifdef TFM_ISO 29 | fp_word tt; 30 | #endif 31 | #ifndef WOLFSSL_SMALL_STACK 32 | fp_digit b[8]; 33 | #else 34 | fp_digit *b; 35 | #endif 36 | 37 | #ifdef WOLFSSL_SMALL_STACK 38 | b = (fp_digit*)XMALLOC(sizeof(fp_digit) * 8, NULL, DYNAMIC_TYPE_TMP_BUFFER); 39 | if (b == NULL) 40 | return FP_MEM; 41 | #endif 42 | 43 | a = A->dp; 44 | COMBA_START; 45 | 46 | /* clear carries */ 47 | CLEAR_CARRY; 48 | 49 | /* output 0 */ 50 | SQRADD(a[0],a[0]); 51 | COMBA_STORE(b[0]); 52 | 53 | /* output 1 */ 54 | CARRY_FORWARD; 55 | SQRADD2(a[0], a[1]); 56 | COMBA_STORE(b[1]); 57 | 58 | /* output 2 */ 59 | CARRY_FORWARD; 60 | SQRADD2(a[0], a[2]); SQRADD(a[1], a[1]); 61 | COMBA_STORE(b[2]); 62 | 63 | /* output 3 */ 64 | CARRY_FORWARD; 65 | SQRADD2(a[0], a[3]); SQRADD2(a[1], a[2]); 66 | COMBA_STORE(b[3]); 67 | 68 | /* output 4 */ 69 | CARRY_FORWARD; 70 | SQRADD2(a[1], a[3]); SQRADD(a[2], a[2]); 71 | COMBA_STORE(b[4]); 72 | 73 | /* output 5 */ 74 | CARRY_FORWARD; 75 | SQRADD2(a[2], a[3]); 76 | COMBA_STORE(b[5]); 77 | 78 | /* output 6 */ 79 | CARRY_FORWARD; 80 | SQRADD(a[3], a[3]); 81 | COMBA_STORE(b[6]); 82 | COMBA_STORE2(b[7]); 83 | COMBA_FINI; 84 | 85 | B->used = 8; 86 | B->sign = FP_ZPOS; 87 | XMEMCPY(B->dp, b, 8 * sizeof(fp_digit)); 88 | fp_clamp(B); 89 | 90 | #ifdef WOLFSSL_SMALL_STACK 91 | XFREE(b, NULL, DYNAMIC_TYPE_TMP_BUFFER); 92 | #endif 93 | return FP_OKAY; 94 | } 95 | #endif 96 | 97 | 98 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * pppcrypt.c - PPP/DES linkage for MS-CHAP and EAP SRP-SHA1 3 | * 4 | * Extracted from chap_ms.c by James Carlson. 5 | * 6 | * Copyright (c) 1995 Eric Rosenquist. All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in 17 | * the documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * 3. The name(s) of the authors of this software must not be used to 21 | * endorse or promote products derived from this software without 22 | * prior written permission. 23 | * 24 | * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO 25 | * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 26 | * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY 27 | * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 28 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 29 | * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 30 | * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 31 | */ 32 | 33 | #include "netif/ppp/ppp_opts.h" 34 | #if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not necessary */ 35 | 36 | #include "netif/ppp/ppp_impl.h" 37 | 38 | #include "netif/ppp/pppcrypt.h" 39 | 40 | 41 | static u_char pppcrypt_get_7bits(u_char *input, int startBit) { 42 | unsigned int word; 43 | 44 | word = (unsigned)input[startBit / 8] << 8; 45 | word |= (unsigned)input[startBit / 8 + 1]; 46 | 47 | word >>= 15 - (startBit % 8 + 7); 48 | 49 | return word & 0xFE; 50 | } 51 | 52 | /* IN 56 bit DES key missing parity bits 53 | * OUT 64 bit DES key with parity bits added 54 | */ 55 | void pppcrypt_56_to_64_bit_key(u_char *key, u_char * des_key) { 56 | des_key[0] = pppcrypt_get_7bits(key, 0); 57 | des_key[1] = pppcrypt_get_7bits(key, 7); 58 | des_key[2] = pppcrypt_get_7bits(key, 14); 59 | des_key[3] = pppcrypt_get_7bits(key, 21); 60 | des_key[4] = pppcrypt_get_7bits(key, 28); 61 | des_key[5] = pppcrypt_get_7bits(key, 35); 62 | des_key[6] = pppcrypt_get_7bits(key, 42); 63 | des_key[7] = pppcrypt_get_7bits(key, 49); 64 | } 65 | 66 | #endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ 67 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h: -------------------------------------------------------------------------------- 1 | /* wolfcaam_sha.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | #ifndef WOLF_CRYPT_CAAM_SHA_H 23 | #define WOLF_CRYPT_CAAM_SHA_H 24 | 25 | #include 26 | 27 | #ifdef WOLFSSL_IMX6_CAAM 28 | 29 | #include 30 | 31 | #define WOLFSSL_NO_HASH_RAW 32 | 33 | #ifndef WC_CAAM_CTXLEN 34 | /* last 8 bytes of context is for length */ 35 | #define WC_CAAM_CTXLEN 8 36 | #endif 37 | 38 | #ifndef WC_CAAM_HASH_BLOCK 39 | /* define sha structures and also get the max possible digest. Start with SHA 40 | digest size */ 41 | #define WC_CAAM_HASH_BLOCK 64 42 | #endif 43 | 44 | #ifndef WC_CAAM_MAX_DIGEST 45 | #define WC_CAAM_MAX_DIGEST 20 46 | #ifdef WOLFSSL_SHA224 47 | #undef WC_CAAM_MAX_DIGEST 48 | #define WC_CAAM_MAX_DIGEST 32 49 | #endif 50 | 51 | #ifndef NO_SHA256 52 | #undef WC_CAAM_MAX_DIGEST 53 | #define WC_CAAM_MAX_DIGEST 32 54 | #endif 55 | 56 | #ifdef WOLFSSL_SHA384 57 | #undef WC_CAAM_MAX_DIGEST 58 | #define WC_CAAM_MAX_DIGEST 64 59 | #endif 60 | 61 | #ifdef WOLFSSL_SHA512 62 | #undef WC_CAAM_MAX_DIGEST 63 | #define WC_CAAM_MAX_DIGEST 64 64 | #endif 65 | #endif /* WC_CAAM_MAX_DIGEST */ 66 | 67 | 68 | typedef struct wc_Sha { 69 | word32 ctx[(WC_CAAM_MAX_DIGEST + WC_CAAM_CTXLEN) / sizeof(word32)]; 70 | word32 buffLen; /* in bytes */ 71 | word32 buffer[WC_CAAM_HASH_BLOCK / sizeof(word32)]; 72 | } wc_Sha; 73 | 74 | #ifndef NO_MD5 75 | typedef struct wc_Sha wc_Md5; 76 | #endif 77 | 78 | #ifndef NO_SHA256 79 | typedef struct wc_Sha wc_Sha256; 80 | #endif 81 | 82 | #ifdef WOLFSSL_SHA512 83 | typedef struct wc_Sha wc_Sha512; 84 | #endif 85 | 86 | #endif /* WOLFSSL_IMX6_CAAM */ 87 | 88 | #endif /* WOLF_CRYPT_CAAM_SHA_H */ 89 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/pkcs12.h: -------------------------------------------------------------------------------- 1 | /* pkcs12.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | #ifndef WOLF_CRYPT_PKCS12_H 24 | #define WOLF_CRYPT_PKCS12_H 25 | 26 | #include 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | #ifndef WOLFSSL_TYPES_DEFINED /* do not redeclare from ssl.h */ 33 | typedef struct WC_PKCS12 WC_PKCS12; 34 | #endif 35 | 36 | typedef struct WC_DerCertList { /* dereferenced in ssl.c */ 37 | byte* buffer; 38 | word32 bufferSz; 39 | struct WC_DerCertList* next; 40 | } WC_DerCertList; 41 | 42 | /* default values for creating PKCS12 */ 43 | enum { 44 | WC_PKCS12_ITT_DEFAULT = 2048, 45 | WC_PKCS12_VERSION_DEFAULT = 3, 46 | WC_PKCS12_MAC_DEFAULT = 1, 47 | }; 48 | 49 | WOLFSSL_API WC_PKCS12* wc_PKCS12_new(void); 50 | WOLFSSL_API void wc_PKCS12_free(WC_PKCS12* pkcs12); 51 | WOLFSSL_API int wc_d2i_PKCS12(const byte* der, word32 derSz, WC_PKCS12* pkcs12); 52 | WOLFSSL_API int wc_i2d_PKCS12(WC_PKCS12* pkcs12, byte** der, int* derSz); 53 | WOLFSSL_API int wc_PKCS12_parse(WC_PKCS12* pkcs12, const char* psw, 54 | byte** pkey, word32* pkeySz, byte** cert, word32* certSz, 55 | WC_DerCertList** ca); 56 | WOLFSSL_API WC_PKCS12* wc_PKCS12_create(char* pass, word32 passSz, 57 | char* name, byte* key, word32 keySz, byte* cert, word32 certSz, 58 | WC_DerCertList* ca, int nidKey, int nidCert, int iter, int macIter, 59 | int keyType, void* heap); 60 | 61 | 62 | WOLFSSL_LOCAL int wc_PKCS12_SetHeap(WC_PKCS12* pkcs12, void* heap); 63 | WOLFSSL_LOCAL void* wc_PKCS12_GetHeap(WC_PKCS12* pkcs12); 64 | 65 | WOLFSSL_LOCAL void wc_FreeCertList(WC_DerCertList* list, void* heap); 66 | 67 | #ifdef __cplusplus 68 | } /* extern "C" */ 69 | #endif 70 | 71 | #endif /* WOLF_CRYPT_PKCS12_H */ 72 | 73 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfcrypt/src/fp_mul_comba_4.i: -------------------------------------------------------------------------------- 1 | /* fp_mul_comba_4.i 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | 23 | 24 | #ifdef TFM_MUL4 25 | int fp_mul_comba4(fp_int *A, fp_int *B, fp_int *C) 26 | { 27 | fp_digit c0, c1, c2; 28 | #ifndef WOLFSSL_SMALL_STACK 29 | fp_digit at[8]; 30 | #else 31 | fp_digit *at; 32 | #endif 33 | 34 | #ifdef WOLFSSL_SMALL_STACK 35 | at = (fp_digit*)XMALLOC(sizeof(fp_digit) * 8, NULL, DYNAMIC_TYPE_TMP_BUFFER); 36 | if (at == NULL) 37 | return FP_MEM; 38 | #endif 39 | 40 | XMEMCPY(at, A->dp, 4 * sizeof(fp_digit)); 41 | XMEMCPY(at+4, B->dp, 4 * sizeof(fp_digit)); 42 | COMBA_START; 43 | 44 | COMBA_CLEAR; 45 | /* 0 */ 46 | MULADD(at[0], at[4]); 47 | COMBA_STORE(C->dp[0]); 48 | /* 1 */ 49 | COMBA_FORWARD; 50 | MULADD(at[0], at[5]); MULADD(at[1], at[4]); 51 | COMBA_STORE(C->dp[1]); 52 | /* 2 */ 53 | COMBA_FORWARD; 54 | MULADD(at[0], at[6]); MULADD(at[1], at[5]); MULADD(at[2], at[4]); 55 | COMBA_STORE(C->dp[2]); 56 | /* 3 */ 57 | COMBA_FORWARD; 58 | MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); MULADD(at[3], at[4]); 59 | COMBA_STORE(C->dp[3]); 60 | /* 4 */ 61 | COMBA_FORWARD; 62 | MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]); 63 | COMBA_STORE(C->dp[4]); 64 | /* 5 */ 65 | COMBA_FORWARD; 66 | MULADD(at[2], at[7]); MULADD(at[3], at[6]); 67 | COMBA_STORE(C->dp[5]); 68 | /* 6 */ 69 | COMBA_FORWARD; 70 | MULADD(at[3], at[7]); 71 | COMBA_STORE(C->dp[6]); 72 | COMBA_STORE2(C->dp[7]); 73 | C->used = 8; 74 | C->sign = A->sign ^ B->sign; 75 | fp_clamp(C); 76 | COMBA_FINI; 77 | 78 | #ifdef WOLFSSL_SMALL_STACK 79 | XFREE(at, NULL, DYNAMIC_TYPE_TMP_BUFFER); 80 | #endif 81 | return FP_OKAY; 82 | } 83 | #endif 84 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/system/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | #ifndef __SYS_ARCH_H__ 33 | #define __SYS_ARCH_H__ 34 | 35 | #include "lwip/opt.h" 36 | 37 | #if (NO_SYS != 0) 38 | #error "NO_SYS need to be set to 0 to use threaded API" 39 | #endif 40 | 41 | #include "cmsis_os.h" 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | #if (osCMSIS < 0x20000U) 48 | 49 | #define SYS_MBOX_NULL (osMessageQId)0 50 | #define SYS_SEM_NULL (osSemaphoreId)0 51 | 52 | typedef osSemaphoreId sys_sem_t; 53 | typedef osSemaphoreId sys_mutex_t; 54 | typedef osMessageQId sys_mbox_t; 55 | typedef osThreadId sys_thread_t; 56 | #else 57 | 58 | #define SYS_MBOX_NULL (osMessageQueueId_t)0 59 | #define SYS_SEM_NULL (osSemaphoreId_t)0 60 | 61 | typedef osSemaphoreId_t sys_sem_t; 62 | typedef osSemaphoreId_t sys_mutex_t; 63 | typedef osMessageQueueId_t sys_mbox_t; 64 | typedef osThreadId_t sys_thread_t; 65 | #endif 66 | 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif /* __SYS_ARCH_H__ */ 72 | 73 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/chacha.h: -------------------------------------------------------------------------------- 1 | /* chacha.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/chacha.h 24 | */ 25 | 26 | 27 | #ifndef WOLF_CRYPT_CHACHA_H 28 | #define WOLF_CRYPT_CHACHA_H 29 | 30 | #include 31 | 32 | #ifdef HAVE_CHACHA 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /* Size of the IV */ 39 | #define CHACHA_IV_WORDS 3 40 | #define CHACHA_IV_BYTES (CHACHA_IV_WORDS * sizeof(word32)) 41 | 42 | /* Size of ChaCha chunks */ 43 | #define CHACHA_CHUNK_WORDS 16 44 | #define CHACHA_CHUNK_BYTES (CHACHA_CHUNK_WORDS * sizeof(word32)) 45 | 46 | #ifdef WOLFSSL_X86_64_BUILD 47 | #if defined(USE_INTEL_SPEEDUP) && !defined(NO_CHACHA_ASM) 48 | #define USE_INTEL_CHACHA_SPEEDUP 49 | #define HAVE_INTEL_AVX1 50 | #endif 51 | #endif 52 | 53 | enum { 54 | CHACHA_ENC_TYPE = WC_CIPHER_CHACHA, /* cipher unique type */ 55 | CHACHA_MAX_KEY_SZ = 32, 56 | }; 57 | 58 | typedef struct ChaCha { 59 | word32 X[CHACHA_CHUNK_WORDS]; /* state of cipher */ 60 | word32 left; /* number of bytes leftover */ 61 | #ifdef HAVE_INTEL_AVX1 62 | /* vpshufd reads 16 bytes but we only use bottom 4. */ 63 | byte extra[12]; 64 | #endif 65 | } ChaCha; 66 | 67 | /** 68 | * IV(nonce) changes with each record 69 | * counter is for what value the block counter should start ... usually 0 70 | */ 71 | WOLFSSL_API int wc_Chacha_SetIV(ChaCha* ctx, const byte* inIv, word32 counter); 72 | 73 | WOLFSSL_API int wc_Chacha_Process(ChaCha* ctx, byte* cipher, const byte* plain, 74 | word32 msglen); 75 | WOLFSSL_API int wc_Chacha_SetKey(ChaCha* ctx, const byte* key, word32 keySz); 76 | 77 | #ifdef __cplusplus 78 | } /* extern "C" */ 79 | #endif 80 | 81 | #endif /* HAVE_CHACHA */ 82 | #endif /* WOLF_CRYPT_CHACHA_H */ 83 | 84 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/prot/mld6.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * MLD6 protocol definitions 4 | */ 5 | 6 | /* 7 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, 11 | * are permitted provided that the following conditions are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, 16 | * this list of conditions and the following disclaimer in the documentation 17 | * and/or other materials provided with the distribution. 18 | * 3. The name of the author may not be used to endorse or promote products 19 | * derived from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 24 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 26 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 29 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 30 | * OF SUCH DAMAGE. 31 | * 32 | * This file is part of the lwIP TCP/IP stack. 33 | * 34 | * Author: Adam Dunkels 35 | * 36 | */ 37 | #ifndef LWIP_HDR_PROT_MLD6_H 38 | #define LWIP_HDR_PROT_MLD6_H 39 | 40 | #include "lwip/arch.h" 41 | #include "lwip/prot/ip6.h" 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | #define MLD6_HBH_HLEN 8 48 | /** Multicast listener report/query/done message header. */ 49 | #ifdef PACK_STRUCT_USE_INCLUDES 50 | # include "arch/bpstruct.h" 51 | #endif 52 | PACK_STRUCT_BEGIN 53 | struct mld_header { 54 | PACK_STRUCT_FLD_8(u8_t type); 55 | PACK_STRUCT_FLD_8(u8_t code); 56 | PACK_STRUCT_FIELD(u16_t chksum); 57 | PACK_STRUCT_FIELD(u16_t max_resp_delay); 58 | PACK_STRUCT_FIELD(u16_t reserved); 59 | PACK_STRUCT_FLD_S(ip6_addr_p_t multicast_address); 60 | /* Options follow. */ 61 | } PACK_STRUCT_STRUCT; 62 | PACK_STRUCT_END 63 | #ifdef PACK_STRUCT_USE_INCLUDES 64 | # include "arch/epstruct.h" 65 | #endif 66 | 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif /* LWIP_HDR_PROT_MLD6_H */ 72 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/openssl/include.am: -------------------------------------------------------------------------------- 1 | # vim:ft=automake 2 | # All paths should be given relative to the root 3 | 4 | nobase_include_HEADERS+= \ 5 | wolfssl/openssl/asn1.h \ 6 | wolfssl/openssl/asn1t.h \ 7 | wolfssl/openssl/aes.h\ 8 | wolfssl/openssl/bio.h \ 9 | wolfssl/openssl/bn.h \ 10 | wolfssl/openssl/buffer.h \ 11 | wolfssl/openssl/conf.h \ 12 | wolfssl/openssl/crypto.h \ 13 | wolfssl/openssl/des.h \ 14 | wolfssl/openssl/dh.h \ 15 | wolfssl/openssl/dsa.h \ 16 | wolfssl/openssl/ecdsa.h \ 17 | wolfssl/openssl/ecdh.h \ 18 | wolfssl/openssl/ec.h \ 19 | wolfssl/openssl/ec25519.h \ 20 | wolfssl/openssl/ed25519.h \ 21 | wolfssl/openssl/ec448.h \ 22 | wolfssl/openssl/ed448.h \ 23 | wolfssl/openssl/engine.h \ 24 | wolfssl/openssl/err.h \ 25 | wolfssl/openssl/evp.h \ 26 | wolfssl/openssl/hmac.h \ 27 | wolfssl/openssl/lhash.h \ 28 | wolfssl/openssl/md4.h \ 29 | wolfssl/openssl/md5.h \ 30 | wolfssl/openssl/ripemd.h \ 31 | wolfssl/openssl/obj_mac.h \ 32 | wolfssl/openssl/objects.h \ 33 | wolfssl/openssl/ocsp.h \ 34 | wolfssl/openssl/opensslconf.h \ 35 | wolfssl/openssl/opensslv.h \ 36 | wolfssl/openssl/ossl_typ.h \ 37 | wolfssl/openssl/pem.h \ 38 | wolfssl/openssl/pkcs12.h \ 39 | wolfssl/openssl/pkcs7.h \ 40 | wolfssl/openssl/rand.h \ 41 | wolfssl/openssl/rsa.h \ 42 | wolfssl/openssl/sha.h \ 43 | wolfssl/openssl/sha3.h \ 44 | wolfssl/openssl/ssl23.h \ 45 | wolfssl/openssl/ssl.h \ 46 | wolfssl/openssl/stack.h \ 47 | wolfssl/openssl/tls1.h \ 48 | wolfssl/openssl/ui.h \ 49 | wolfssl/openssl/x509.h \ 50 | wolfssl/openssl/x509_vfy.h \ 51 | wolfssl/openssl/x509v3.h \ 52 | wolfssl/openssl/rc4.h 53 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns_opts.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * NETBIOS name service responder options 4 | */ 5 | 6 | /* 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 3. The name of the author may not be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 27 | * OF SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | */ 32 | #ifndef LWIP_HDR_APPS_NETBIOS_OPTS_H 33 | #define LWIP_HDR_APPS_NETBIOS_OPTS_H 34 | 35 | #include "lwip/opt.h" 36 | 37 | /** 38 | * @defgroup netbiosns_opts Options 39 | * @ingroup netbiosns 40 | * @{ 41 | */ 42 | 43 | /** NetBIOS name of lwip device 44 | * This must be uppercase until NETBIOS_STRCMP() is defined to a string 45 | * comparision function that is case insensitive. 46 | * If you want to use the netif's hostname, use this (with LWIP_NETIF_HOSTNAME): 47 | * (ip_current_netif() != NULL ? ip_current_netif()->hostname != NULL ? ip_current_netif()->hostname : "" : "") 48 | * 49 | * If this is not defined, netbiosns_set_name() can be called at runtime to change the name. 50 | */ 51 | #ifdef __DOXYGEN__ 52 | #define NETBIOS_LWIP_NAME "NETBIOSLWIPDEV" 53 | #endif 54 | 55 | /** Respond to NetBIOS name queries 56 | * Default is disabled 57 | */ 58 | #if !defined LWIP_NETBIOS_RESPOND_NAME_QUERY || defined __DOXYGEN__ 59 | #define LWIP_NETBIOS_RESPOND_NAME_QUERY 0 60 | #endif 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | #endif /* LWIP_HDR_APPS_NETBIOS_OPTS_H */ 67 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/LwIP/src/include/lwip/if_api.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Interface Identification APIs from: 4 | * RFC 3493: Basic Socket Interface Extensions for IPv6 5 | * Section 4: Interface Identification 6 | */ 7 | 8 | /* 9 | * Copyright (c) 2017 Joel Cunningham, Garmin International, Inc. 10 | * All rights reserved. 11 | * 12 | * Redistribution and use in source and binary forms, with or without modification, 13 | * are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. The name of the author may not be used to endorse or promote products 21 | * derived from this software without specific prior written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 26 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 28 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 31 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 32 | * OF SUCH DAMAGE. 33 | * 34 | * This file is part of the lwIP TCP/IP stack. 35 | * 36 | * Author: Joel Cunningham 37 | * 38 | */ 39 | #ifndef LWIP_HDR_IF_H 40 | #define LWIP_HDR_IF_H 41 | 42 | #include "lwip/opt.h" 43 | 44 | #if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ 45 | 46 | #include "lwip/netif.h" 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | #define IF_NAMESIZE NETIF_NAMESIZE 53 | 54 | char * lwip_if_indextoname(unsigned int ifindex, char *ifname); 55 | unsigned int lwip_if_nametoindex(const char *ifname); 56 | 57 | #if LWIP_COMPAT_SOCKETS 58 | #define if_indextoname(ifindex, ifname) lwip_if_indextoname(ifindex,ifname) 59 | #define if_nametoindex(ifname) lwip_if_nametoindex(ifname) 60 | #endif /* LWIP_COMPAT_SOCKETS */ 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif /* LWIP_SOCKET */ 67 | 68 | #endif /* LWIP_HDR_IF_H */ 69 | -------------------------------------------------------------------------------- /Middlewares/Third_Party/WolfSSL/wolfssl/wolfcrypt/idea.h: -------------------------------------------------------------------------------- 1 | /* idea.h 2 | * 3 | * Copyright (C) 2006-2020 wolfSSL Inc. 4 | * 5 | * This file is part of wolfSSL. 6 | * 7 | * wolfSSL is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * wolfSSL is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 | */ 21 | 22 | /*! 23 | \file wolfssl/wolfcrypt/idea.h 24 | */ 25 | 26 | #ifndef WOLF_CRYPT_IDEA_H 27 | #define WOLF_CRYPT_IDEA_H 28 | 29 | #include 30 | 31 | #ifdef HAVE_IDEA 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | enum { 38 | IDEA_MODULO = 0x10001, /* 2^16+1 */ 39 | IDEA_2EXP16 = 0x10000, /* 2^16 */ 40 | IDEA_MASK = 0xFFFF, /* 16 bits set to one */ 41 | IDEA_ROUNDS = 8, /* number of rounds for IDEA */ 42 | IDEA_SK_NUM = (6*IDEA_ROUNDS + 4), /* number of subkeys */ 43 | IDEA_KEY_SIZE = 16, /* size of key in bytes */ 44 | IDEA_BLOCK_SIZE = 8, /* size of IDEA blocks in bytes */ 45 | IDEA_IV_SIZE = 8, /* size of IDEA IV in bytes */ 46 | IDEA_ENCRYPTION = 0, 47 | IDEA_DECRYPTION = 1 48 | }; 49 | 50 | /* IDEA encryption and decryption */ 51 | typedef struct Idea { 52 | word32 reg[IDEA_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ 53 | word32 tmp[IDEA_BLOCK_SIZE / sizeof(word32)]; /* for CBC mode */ 54 | word16 skey[IDEA_SK_NUM]; /* 832 bits expanded key */ 55 | } Idea; 56 | 57 | WOLFSSL_API int wc_IdeaSetKey(Idea *idea, const byte* key, word16 keySz, 58 | const byte *iv, int dir); 59 | WOLFSSL_API int wc_IdeaSetIV(Idea *idea, const byte* iv); 60 | WOLFSSL_API int wc_IdeaCipher(Idea *idea, byte* out, const byte* in); 61 | WOLFSSL_API int wc_IdeaCbcEncrypt(Idea *idea, byte* out, 62 | const byte* in, word32 len); 63 | WOLFSSL_API int wc_IdeaCbcDecrypt(Idea *idea, byte* out, 64 | const byte* in, word32 len); 65 | #ifdef __cplusplus 66 | } /* extern "C" */ 67 | #endif 68 | 69 | #endif /* HAVE_IDEA */ 70 | #endif /* WOLF_CRYPT_IDEA_H */ 71 | -------------------------------------------------------------------------------- /Core/Src/stm32f7xx_hal_msp.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * File Name : stm32f7xx_hal_msp.c 5 | * Description : This file provides code for the MSP Initialization 6 | * and de-Initialization codes. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2020 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under Ultimate Liberty license 14 | * SLA0044, the "License"; You may not use this file except in compliance with 15 | * the License. You may obtain a copy of the License at: 16 | * www.st.com/SLA0044 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | #include "main.h" 24 | /* USER CODE BEGIN Includes */ 25 | 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN Define */ 35 | 36 | /* USER CODE END Define */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN Macro */ 40 | 41 | /* USER CODE END Macro */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* External functions --------------------------------------------------------*/ 54 | /* USER CODE BEGIN ExternalFunctions */ 55 | 56 | /* USER CODE END ExternalFunctions */ 57 | 58 | /* USER CODE BEGIN 0 */ 59 | 60 | /* USER CODE END 0 */ 61 | /** 62 | * Initializes the Global MSP. 63 | */ 64 | void HAL_MspInit(void) 65 | { 66 | /* USER CODE BEGIN MspInit 0 */ 67 | 68 | /* USER CODE END MspInit 0 */ 69 | 70 | __HAL_RCC_PWR_CLK_ENABLE(); 71 | __HAL_RCC_SYSCFG_CLK_ENABLE(); 72 | 73 | /* System interrupt init*/ 74 | /* PendSV_IRQn interrupt configuration */ 75 | HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0); 76 | 77 | /* USER CODE BEGIN MspInit 1 */ 78 | 79 | /* USER CODE END MspInit 1 */ 80 | } 81 | 82 | /* USER CODE BEGIN 1 */ 83 | 84 | /* USER CODE END 1 */ 85 | 86 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 87 | --------------------------------------------------------------------------------