mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-14 19:03:20 +00:00
5 files changed
+31
-7
No files matched your search
@@ -10,7 +10,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
revno: ["--mr v3.7-branch", "--mr v4.2.0"] # LTS, latest stable
|
revno: ["--mr v3.7-branch", "--mr v4.2.0", "--mr v4.3.0"] # LTS, latest stable
|
||||||
name: Zephyr ${{ matrix.revno }}
|
name: Zephyr ${{ matrix.revno }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -21460,6 +21460,15 @@ bool mg_random(void *buf, size_t len) {
|
|||||||
#elif MG_ARCH == MG_ARCH_PICOSDK
|
#elif MG_ARCH == MG_ARCH_PICOSDK
|
||||||
while (len--) *p++ = (unsigned char) (get_rand_32() & 255);
|
while (len--) *p++ = (unsigned char) (get_rand_32() & 255);
|
||||||
success = true;
|
success = true;
|
||||||
|
#elif MG_ARCH == MG_ARCH_ZEPHYR
|
||||||
|
#if MG_TLS == MG_TLS_BUILTIN || \
|
||||||
|
(MG_TLS == MG_TLS_MBED && (!defined(MBEDTLS_VERSION_NUMBER) || \
|
||||||
|
MBEDTLS_VERSION_NUMBER < 0x04000000))
|
||||||
|
return (sys_csrand_get(buf, len) == 0); // do not fallback on reseed error
|
||||||
|
#else
|
||||||
|
sys_rand_get(buf, len);
|
||||||
|
success = true;
|
||||||
|
#endif
|
||||||
#elif MG_ARCH == MG_ARCH_WIN32
|
#elif MG_ARCH == MG_ARCH_WIN32
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||||
static bool initialised = false;
|
static bool initialised = false;
|
||||||
|
|||||||
+6
-3
@@ -723,12 +723,15 @@ typedef int socklen_t;
|
|||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/version.h>
|
#include <zephyr/version.h>
|
||||||
|
#include <zephyr/net/socket.h>
|
||||||
|
//#include <zephyr/posix/dirent.h>
|
||||||
|
#include <zephyr/posix/fcntl.h>
|
||||||
|
#include <zephyr/posix/sys/select.h>
|
||||||
|
#include <zephyr/random/random.h>
|
||||||
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <zephyr/net/socket.h>
|
|
||||||
#include <zephyr/posix/fcntl.h>
|
|
||||||
#include <zephyr/posix/sys/select.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
+6
-3
@@ -4,12 +4,15 @@
|
|||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/version.h>
|
#include <zephyr/version.h>
|
||||||
|
#include <zephyr/net/socket.h>
|
||||||
|
//#include <zephyr/posix/dirent.h>
|
||||||
|
#include <zephyr/posix/fcntl.h>
|
||||||
|
#include <zephyr/posix/sys/select.h>
|
||||||
|
#include <zephyr/random/random.h>
|
||||||
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <zephyr/net/socket.h>
|
|
||||||
#include <zephyr/posix/fcntl.h>
|
|
||||||
#include <zephyr/posix/sys/select.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -27,6 +27,15 @@ bool mg_random(void *buf, size_t len) {
|
|||||||
#elif MG_ARCH == MG_ARCH_PICOSDK
|
#elif MG_ARCH == MG_ARCH_PICOSDK
|
||||||
while (len--) *p++ = (unsigned char) (get_rand_32() & 255);
|
while (len--) *p++ = (unsigned char) (get_rand_32() & 255);
|
||||||
success = true;
|
success = true;
|
||||||
|
#elif MG_ARCH == MG_ARCH_ZEPHYR
|
||||||
|
#if MG_TLS == MG_TLS_BUILTIN || \
|
||||||
|
(MG_TLS == MG_TLS_MBED && (!defined(MBEDTLS_VERSION_NUMBER) || \
|
||||||
|
MBEDTLS_VERSION_NUMBER < 0x04000000))
|
||||||
|
return (sys_csrand_get(buf, len) == 0); // do not fallback on reseed error
|
||||||
|
#else
|
||||||
|
sys_rand_get(buf, len);
|
||||||
|
success = true;
|
||||||
|
#endif
|
||||||
#elif MG_ARCH == MG_ARCH_WIN32
|
#elif MG_ARCH == MG_ARCH_WIN32
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||||
static bool initialised = false;
|
static bool initialised = false;
|
||||||
|
|||||||
Reference in new issue
Block a user