mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
windows: mbedtls: clean warnings
This commit is contained in:
parent
dffe96446a
commit
334212ef2e
5 changed files with 25 additions and 19 deletions
32
.sai.json
32
.sai.json
|
@ -57,19 +57,24 @@
|
|||
"build": "mkdir build;cd build;export CCACHE_DISABLE=1;cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/tmp -DCMAKE_TOOLCHAIN_FILE=../contrib/cross-linkit.cmake -DLWS_PLAT_FREERTOS=1 -DLWS_WITH_ZLIB=0 -DLWS_WITHOUT_EXTENSIONS=1 -DLWS_WITH_ZIP_FOPS=0 -DLWS_WITH_HTTP_STREAM_COMPRESSION=0 -DLWS_WITH_MBEDTLS=1 -DLWS_WITH_FILE_OPS=0 ${cmake};make -j",
|
||||
"default": false
|
||||
},
|
||||
"windows-10/x86_64-amd/msvc": {
|
||||
"w10/x86_64-amd/msvc": {
|
||||
"build": "mkdir build && cd build && set SAI_CPACK=\"-G ZIP\" && cmake .. -DLWS_OPENSSL_LIBRARIES=\"C:\\Program Files\\OpenSSL\\lib\\libssl.lib;C:\\Program Files\\OpenSSL\\lib\\libcrypto.lib\" -DLWS_OPENSSL_INCLUDE_DIRS=\"C:\\Program Files\\OpenSSL\\include\" -DLWS_EXT_PTHREAD_INCLUDE_DIR=\"C:\\Program Files (x86)\\pthreads\\include\" -DLWS_EXT_PTHREAD_LIBRARIES=\"C:\\Program Files (x86)\\pthreads\\lib\\x64\\libpthreadGC2.a\" ${cmake} && cmake --build . --config DEBUG && set CTEST_OUTPUT_ON_FAILURE=1 && ctest . -C DEBUG -j1 --output-on-failure",
|
||||
"default": false
|
||||
},
|
||||
"windows-10/x86_64-amd/noptmsvc": {
|
||||
|
||||
"w10/x86_64-amd/wmbedtlsmsvc": {
|
||||
"build": "mkdir build && cd build && set SAI_CPACK=\"-G ZIP\" && cmake .. -DLWS_WITH_MBEDTLS=1 -DLWS_MBEDTLS_INCLUDE_DIRS=\"C:/Program Files (x86)/mbed TLS/include\" -DMBEDTLS_LIBRARY=\"C:/Program Files (x86)/mbed TLS/lib/mbedtls.lib\" -DMBEDX509_LIBRARY=\"C:/Program Files (x86)/mbed TLS/lib/mbedx509.lib\" -DMBEDCRYPTO_LIBRARY=\"C:/Program Files (x86)/mbed TLS/lib/mbedcrypto.lib\" -DLWS_EXT_PTHREAD_INCLUDE_DIR=\"C:\\Program Files (x86)\\pthreads\\include\" -DLWS_EXT_PTHREAD_LIBRARIES=\"C:\\Program Files (x86)\\pthreads\\lib\\x64\\libpthreadGC2.a\" ${cmake} && cmake --build . --config DEBUG && set CTEST_OUTPUT_ON_FAILURE=1 && ctest . -C DEBUG -j1 --output-on-failure",
|
||||
"default": false
|
||||
},
|
||||
"w10/x86_64-amd/noptmsvc": {
|
||||
"build": "mkdir build && cd build && set SAI_CPACK=\"-G ZIP\" && cmake .. -DLWS_OPENSSL_LIBRARIES=\"C:\\Program Files\\OpenSSL\\lib\\libssl.lib;C:\\Program Files\\OpenSSL\\lib\\libcrypto.lib\" -DLWS_OPENSSL_INCLUDE_DIRS=\"C:\\Program Files\\OpenSSL\\include\" ${cmake} && cmake --build . --config DEBUG && set CTEST_OUTPUT_ON_FAILURE=1 && ctest . -C DEBUG -j1 --output-on-failure",
|
||||
"default": false
|
||||
},
|
||||
"windows-10/x86_64-amd/mingw32": {
|
||||
"w10/x86_64-amd/mingw32": {
|
||||
"build": "mkdir build && cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=../contrib/cross-w32.cmake ${cmake} && cmake --build . --config DEBUG",
|
||||
"default": false
|
||||
},
|
||||
"windows-10/x86_64-amd/mingw64": {
|
||||
"w10/x86_64-amd/mingw64": {
|
||||
"build": "mkdir build && cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=../contrib/cross-w64.cmake ${cmake} && cmake --build . --config DEBUG",
|
||||
"default": false
|
||||
},
|
||||
|
@ -95,7 +100,7 @@
|
|||
"configurations": {
|
||||
"default": {
|
||||
"cmake": "",
|
||||
"platforms": "windows-10/x86_64-amd/msvc, windows-10/x86_64-amd/noptmsvc, freertos-linkit/arm32-m4-mt7697-usi/gcc, linux-ubuntu-2004/aarch64-a72-bcm2711-rpi4/gcc, windows-10/x86_64-amd/mingw32, windows-10/x86_64-amd/mingw64, netbsd/aarch64BE-bcm2837-a53/gcc"
|
||||
"platforms": "w10/x86_64-amd/msvc, w10/x86_64-amd/noptmsvc, freertos-linkit/arm32-m4-mt7697-usi/gcc, linux-ubuntu-2004/aarch64-a72-bcm2711-rpi4/gcc, w10/x86_64-amd/mingw32, w10/x86_64-amd/mingw64, netbsd/aarch64BE-bcm2837-a53/gcc, w10/x86_64-amd/wmbedtls-msvc"
|
||||
},
|
||||
"esp32-heltec": {
|
||||
"cmake": "",
|
||||
|
@ -126,7 +131,7 @@
|
|||
},
|
||||
"default-examples": {
|
||||
"cmake": "-DLWS_WITH_MINIMAL_EXAMPLES=1",
|
||||
"platforms": "windows-10/x86_64-amd/msvc, windows-10/x86_64-amd/noptmsvc, linux-ubuntu-2004/aarch64-a72-bcm2711-rpi4/gcc, netbsd/aarch64BE-bcm2837-a53/gcc"
|
||||
"platforms": "w10/x86_64-amd/msvc, w10/x86_64-amd/noptmsvc, linux-ubuntu-2004/aarch64-a72-bcm2711-rpi4/gcc, netbsd/aarch64BE-bcm2837-a53/gcc"
|
||||
},
|
||||
"h1only-examples": {
|
||||
"cmake": "cmake .. -DLWS_WITH_HTTP2=0 -DLWS_WITH_MINIMAL_EXAMPLES=1",
|
||||
|
@ -134,7 +139,7 @@
|
|||
},
|
||||
"unix-domain": {
|
||||
"cmake": "-DUNIX_SOCK=1",
|
||||
"platforms": "windows-10/x86_64-amd/msvc, windows-10/x86_64-amd/noptmsvc"
|
||||
"platforms": "w10/x86_64-amd/msvc, w10/x86_64-amd/noptmsvc"
|
||||
},
|
||||
"plugins": {
|
||||
"cmake": "-DLWS_WITH_PLUGINS=1",
|
||||
|
@ -142,19 +147,20 @@
|
|||
},
|
||||
"lws_system": {
|
||||
"cmake": "-DLWS_WITH_ACME=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DCMAKE_BUILD_TYPE=RELEASE -DLWS_WITH_GENCRYPTO=1 -DLWS_WITH_JOSE=1 -DLWS_WITH_SYS_ASYNC_DNS=1 -DLWS_WITH_SYS_NTPCLIENT=1",
|
||||
"platforms": "windows-10/x86_64-amd/msvc, windows-10/x86_64-amd/noptmsvc"
|
||||
"platforms": "w10/x86_64-amd/msvc, w10/x86_64-amd/noptmsvc"
|
||||
},
|
||||
"secure-streams": {
|
||||
"cmake": "-DLWS_WITH_SECURE_STREAMS=1",
|
||||
"platforms": "windows-10/x86_64-amd/msvc, windows-10/x86_64-amd/noptmsvc"
|
||||
"platforms": "w10/x86_64-amd/msvc, w10/x86_64-amd/noptmsvc"
|
||||
},
|
||||
"secure-streams-proxy": {
|
||||
"cmake": "-DLWS_WITH_SECURE_STREAMS=1 -DLWS_WITH_SECURE_STREAMS_PROXY_API=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_SECURE_STREAMS_AUTH_SIGV4=1",
|
||||
"platforms": "not windows-10/x86_64-amd/msvc, netbsd/aarch64BE-bcm2837-a53/gcc"
|
||||
"platforms": "not w10/x86_64-amd/msvc, netbsd/aarch64BE-bcm2837-a53/gcc"
|
||||
},
|
||||
|
||||
"distro_recommended": { # minimal examples also needed for ctest
|
||||
"cmake": "-DLWS_WITH_DISTRO_RECOMMENDED=1 -DLWS_WITH_MINIMAL_EXAMPLES=1",
|
||||
"platforms": "not freebsd-12/x86_64-amd/llvm, not linkit-cross, not windows-10/x86_64-amd/msvc, linux-ubuntu-2004/aarch64-a72-bcm2711-rpi4/gcc, linux-fedora-32/riscv64-virt/gcc",
|
||||
"platforms": "not freebsd-12/x86_64-amd/llvm, not linkit-cross, not w10/x86_64-amd/msvc, linux-ubuntu-2004/aarch64-a72-bcm2711-rpi4/gcc, linux-fedora-32/riscv64-virt/gcc",
|
||||
"cpack": "&& cpack $SAI_CPACK",
|
||||
"artifacts": "build/*.rpm, build/*.deb, build/*.zip"
|
||||
},
|
||||
|
@ -204,7 +210,7 @@
|
|||
},
|
||||
"ipv6": {
|
||||
"cmake": "-DLWS_IPV6=ON",
|
||||
"platforms": "windows-10/x86_64-amd/mingw64, windows-10/x86_64-amd/msvc"
|
||||
"platforms": "w10/x86_64-amd/mingw64, w10/x86_64-amd/msvc"
|
||||
},
|
||||
"nonetlink": {
|
||||
"cmake": "-DLWS_WITH_NETLINK=0",
|
||||
|
@ -231,7 +237,7 @@
|
|||
},
|
||||
"threadpool": {
|
||||
"cmake": "-DLWS_WITH_THREADPOOL=1 -DLWS_WITH_MINIMAL_EXAMPLES=1",
|
||||
"platforms": "windows-10/x86_64-amd/msvc"
|
||||
"platforms": "w10/x86_64-amd/msvc"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -386,7 +386,7 @@ lws_plat_mbedtls_net_send(void *ctx, const uint8_t *buf, size_t len)
|
|||
if (fd < 0)
|
||||
return MBEDTLS_ERR_NET_INVALID_CONTEXT;
|
||||
|
||||
ret = write(fd, buf, len);
|
||||
ret = write(fd, buf, (unsigned int)len);
|
||||
if (ret >= 0)
|
||||
return ret;
|
||||
|
||||
|
@ -408,7 +408,7 @@ lws_plat_mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)
|
|||
if (fd < 0)
|
||||
return MBEDTLS_ERR_NET_INVALID_CONTEXT;
|
||||
|
||||
ret = (int)read(fd, buf, len);
|
||||
ret = (int)read(fd, buf, (unsigned int)len);
|
||||
if (ret >= 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ lws_ssl_client_bio_create(struct lws *wsi)
|
|||
SSL_set_verify(wsi->tls.ssl, SSL_VERIFY_PEER,
|
||||
OpenSSL_client_verify_callback);
|
||||
|
||||
SSL_set_fd(wsi->tls.ssl, wsi->desc.sockfd);
|
||||
SSL_set_fd(wsi->tls.ssl, (int)wsi->desc.sockfd);
|
||||
|
||||
if (wsi->sys_tls_client_cert) {
|
||||
lws_system_blob_t *b = lws_system_get_blob(wsi->a.context,
|
||||
|
|
|
@ -262,7 +262,7 @@ lws_tls_server_new_nonblocking(struct lws *wsi, lws_sockfd_type accept_fd)
|
|||
return 1;
|
||||
}
|
||||
|
||||
SSL_set_fd(wsi->tls.ssl, accept_fd);
|
||||
SSL_set_fd(wsi->tls.ssl, (int)accept_fd);
|
||||
|
||||
if (wsi->a.vhost->tls.ssl_info_event_mask)
|
||||
SSL_set_info_callback(wsi->tls.ssl, lws_ssl_info_callback);
|
||||
|
|
|
@ -239,7 +239,7 @@ void SSL_CTX_free(SSL_CTX* ctx)
|
|||
X509_free(ctx->client_CA);
|
||||
|
||||
if (ctx->alpn_protos)
|
||||
ssl_mem_free(ctx->alpn_protos);
|
||||
ssl_mem_free((void *)ctx->alpn_protos);
|
||||
|
||||
ssl_mem_free(ctx);
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ void SSL_free(SSL *ssl)
|
|||
SSL_SESSION_free(ssl->session);
|
||||
|
||||
if (ssl->alpn_protos)
|
||||
ssl_mem_free(ssl->alpn_protos);
|
||||
ssl_mem_free((void *)ssl->alpn_protos);
|
||||
|
||||
ssl_mem_free(ssl);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue