]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA/windows: add MSVC wolfSSL job with test
authorTal Regev <tal.regev@gmail.com>
Mon, 15 Jul 2024 18:29:17 +0000 (21:29 +0300)
committerViktor Szakats <commit@vsz.me>
Tue, 16 Jul 2024 09:56:34 +0000 (11:56 +0200)
Fix the file of wolfssl.c because of this warning/error:
```
curl\lib\vtls\wolfssl.c(1017,42): error C2220: the following warning is treated as an error [curl\bld\lib\libcurl_object.vcxproj]
curl\lib\vtls\wolfssl.c(1017,42): warning C4267: 'function': conversion from 'size_t' to 'unsigned long', possible loss of data [curl\bld\lib\libcurl_object.vcxproj]
```

`size_t` in MSVC is different. Change it to `unsigned long` because
`wolfSSL_ERR_error_string_n` last argument is defined as
`unsigned long`.

Closes #14193

.github/workflows/windows.yml
lib/vtls/wolfssl.c

index c6c4c9d1a8e3c1777ee25bc707b4a9a0d5d10ad2..86353d9cc26f86d2a9b646c8f1b6134daf214b00 100644 (file)
@@ -567,6 +567,13 @@ jobs:
           type: 'Debug'
           tflags: '~1516 ~2301 ~2302 ~2303 ~2307'
           config: '-DENABLE_DEBUG=ON -DENABLE_UNICODE=OFF -DCURL_USE_SCHANNEL=OFF -DCURL_BROTLI=ON -DCURL_ZSTD=ON -DCURL_USE_LIBPSL=ON -DHTTP_ONLY=ON'
+        - name: 'wolfssl'
+          install: 'brotli zlib zstd libpsl nghttp2 wolfssl libssh2 pkgconf gsasl'
+          arch: 'x64'
+          plat: 'windows'
+          type: 'Debug'
+          tflags: '~1516'
+          config: '-DENABLE_DEBUG=ON -DENABLE_UNICODE=OFF -DCURL_USE_SCHANNEL=OFF -DCURL_BROTLI=ON -DCURL_ZSTD=ON -DCURL_USE_LIBPSL=ON -DUSE_NGHTTP2=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_WOLFSSL=ON -DCURL_USE_GSASL=ON'
       fail-fast: false
     steps:
       - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
index a8ae28f09bfb90493edbaa7a15663111bdd337fb..0ff36d99d6ba5e452d86d2194f776e63e879d5a4 100644 (file)
@@ -1009,7 +1009,8 @@ wolfssl_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
 }
 
 
-static char *wolfssl_strerror(unsigned long error, char *buf, size_t size)
+static char *wolfssl_strerror(unsigned long error, char *buf,
+                              unsigned long size)
 {
   DEBUGASSERT(size);
   *buf = '\0';