Repository navigation
Conversation
vszakats
marked this pull request as draft
March 1, 2023 14:34
vszakats
force-pushed
the
warn1
branch
7 times, most recently
from
March 2, 2023 00:13
9bd21aa to
15eecfa
Compare
Member
|
This all looks good so far, thanks for all this work! |
vszakats
force-pushed
the
warn1
branch
2 times, most recently
from
March 2, 2023 01:26
318ae0f to
84e875a
Compare
Member
Author
|
Thank you @willco007! |
C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(2232): warning C4005: 'STATUS_INVALID_DISPOSITION': macro redefinition [C:\projects\libssh2\_builds\src\libssh2.vcxproj] C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2240): note: see previous definition of 'STATUS_INVALID_DISPOSITION' Ref: libssh2#733
vszakats
marked this pull request as ready for review
March 2, 2023 02:55
vszakats
force-pushed
the
warn1
branch
2 times, most recently
from
March 2, 2023 03:43
c9b5e56 to
52a9c08
Compare
Member
Author
|
What still needs to be addressed, but in a future PR:
|
vszakats
added a commit
to curl/curl-for-win
that referenced
this pull request
Mar 2, 2023
vszakats
added a commit
to curl/curl-for-win
that referenced
this pull request
Mar 2, 2023
LibreSSL doesn't seem to need NOCRYPT with cmake/autotools builds. With GNU Make builds an uptream fix is coming up, making NOCRYPT unnecessary. Ref: libssh2/libssh2#808
Detection logic copied from curl. Original PR libssh2#734, by Dmitry Kostjučenko
Contributor
|
The flaky tests are issue #804.
|
CMake and curl-for-win builds already did that. TODO: Enable it for all platforms in a separate PR.
Ported from curl.
Such setting disables the hardcoded Intel 64-bit and Intel 32-bit settings, and allow building for ARM64 or any custom config.
To pass custom options to windres, for example for ARCH=custom targets.
To override windres.
Last released in 2004.
The last reference to writev() was deleted in commit 9d55db6 (2007-02-02)
`winsock2.h` and `ws2tcpip.h` are included further down the line from `src/libssh2_priv.h` due to `HAVE_WINSOCK2_H`. `mswsock.h` does not seem to be necessary anymore. Double-including these (before `windows.h`) caused compiler failures when building against BoringSSL and warnings with LibreSSL. It could be worked around by passing `-DNOCRYPT`. Deleting the duplicates fixes these issues. Timeline: 2013: c910cd3 deletes `mswsock.h` from `src/libssh2_priv.h` 2008: 8c43bc5 adds `winsock2.h` and `ws2tcpip.h` to `src/libssh2_priv.h` 2005: dc4bb1a adds the now deleted #includes
As known from curl. ON by default. It controls both the newly added picky warnings for llvm/clang and gcc, and also the pre-existing ones for MSVC.
Even though the MSDN page of this function does not list it as UWP compatible, this function is an alias for RtlSecureZeroMemory(). Doc [1] for the latter says that the function is inlined, so it's safe to use regardless of Windows version. mingw-w64-generated objects also confirm that. libssh2 also had that unconditionally enabled in WinCNG with no report of issues. It's likely dependent on compiler version, but more half-decently modern ones should support it. Make a leap and use it unconditionally in _libssh2_explicit_zero(). [1] https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlsecurezeromemory
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Dec 1, 2023
It looks like NTSTATUS values are mapped to two different types inside Windows headers: ./winnt.h:#define STATUS_NO_MEMORY ((DWORD)0xC0000017) ./ntstatus.h:#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) Of which `winnt.h` is the portable and the wrong one at the same time. A variation of this issue came up earlier in 2addafb libssh2#808
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Dec 1, 2023
By replacing `int` with `NTSTATUS`. ``` src/wincng.c:1339:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1656:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1659:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2102:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2273:27: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2276:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2697:22: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] ``` Ref: https://github.com/libssh2/libssh2/actions/runs/7060704458/job/19220774229#step:6:165 Turns out the above isn't enough (or may not even be strictly necessary), because NTSTATUS values are mapped to two different types inside public Windows headers: ./winnt.h:#define STATUS_NO_MEMORY ((DWORD)0xC0000017) ./ntstatus.h:#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) Of which `winnt.h` is the portable and the wrong one at the same time. A variation of this issue came up earlier in 2addafb libssh2#808 Fix this by casting these Windows constants to `NTSTATUS`.
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Dec 1, 2023
By replacing `int` with `NTSTATUS`. ``` src/wincng.c:1339:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1656:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1659:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2102:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2273:27: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2276:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2697:22: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] ``` Ref: https://github.com/libssh2/libssh2/actions/runs/7060704458/job/19220774229#step:6:165 Turns out the above isn't enough (or may not even be strictly necessary), because NTSTATUS values are mapped to two different types inside public Windows headers: ./winnt.h:#define STATUS_NO_MEMORY ((DWORD)0xC0000017) ./ntstatus.h:#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) Of which `winnt.h` is the portable and the wrong one at the same time. A variation of this issue came up earlier in 2addafb libssh2#808 Fix this by casting these Windows constants to `NTSTATUS`.
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Dec 1, 2023
By replacing `int` with `NTSTATUS`. ``` src/wincng.c:1339:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1656:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1659:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2102:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2273:27: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2276:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2697:22: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] ``` Ref: https://github.com/libssh2/libssh2/actions/runs/7060704458/job/19220774229#step:6:165 Turns out the above isn't enough (or may not even be strictly necessary), because NTSTATUS values are mapped to two different types inside public Windows headers: ./winnt.h:#define STATUS_NO_MEMORY ((DWORD)0xC0000017) ./ntstatus.h:#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) Of which `winnt.h` is the portable and the wrong one at the same time. A variation of this issue came up earlier in 2addafb libssh2#808 Fix this by casting these Windows constants to `NTSTATUS`.
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Dec 2, 2023
By replacing `int` with `NTSTATUS`. ``` src/wincng.c:1339:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1656:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1659:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2102:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2273:27: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2276:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2697:22: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] ``` Ref: https://github.com/libssh2/libssh2/actions/runs/7060704458/job/19220774229#step:6:165 Turns out the above isn't enough (or may not even be strictly necessary), because NTSTATUS values are mapped to two different types inside public Windows headers: ./winnt.h:#define STATUS_NO_MEMORY ((DWORD)0xC0000017) ./ntstatus.h:#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) Of which `winnt.h` is the portable and the wrong one at the same time. A variation of this issue came up earlier in 2addafb libssh2#808 Fix this by casting these Windows constants to `NTSTATUS`.
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Dec 2, 2023
By replacing `int` with `NTSTATUS`. ``` src/wincng.c:1339:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1656:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:1659:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2102:19: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2273:27: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2276:23: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] src/wincng.c:2697:22: warning: signed conversion from 'long unsigned int' to 'int' changes value from '3221225495' to '-1073741801' [-Wsign-conversion] ``` Ref: https://github.com/libssh2/libssh2/actions/runs/7060704458/job/19220774229#step:6:165 Turns out the above isn't enough (or may not even be strictly necessary), because NTSTATUS values are mapped to two different types inside public Windows headers: ./winnt.h:#define STATUS_NO_MEMORY ((DWORD)0xC0000017) ./ntstatus.h:#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) Of which `winnt.h` is the portable and the wrong one at the same time. A variation of this issue came up earlier in 2addafb libssh2#808 Fix this by casting these Windows constants to `NTSTATUS`.
agreppin
pushed a commit
to agreppin/libssh2
that referenced
this pull request
Jul 14, 2024
- in `hostkey.c` check the result of `libssh2_sha256_init()` and `libssh2_sha512_init()` calls. This avoid the warning that we're ignoring the return values. - fix code using `int` (or `SOCKET`) for sockets. Use libssh2's dedicated `libssh2_socket_t` and `LIBSSH2_INVALID_SOCKET` instead. - fix compiler warnings due to `STATUS_*` macro redefinitions between `ntstatus.h` / `winnt.h`. Solve it by manually defining the single `STATUS` value we need from `ntstatus.h` and stop including the whole header. Fixes libssh2#733 - improve Windows UWP/WinRT builds by detecting it with code copied from the curl project. Then excluding problematic libssh2 parts according to PR by Dmitry Kostjučenko. Fixes libssh2#734 - always use `SecureZeroMemory()` on Windows. We can tweak this if not found or not inlined by a C compiler which we otherwise support. Same if it causes issues with UWP apps. Ref: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa366877(v=vs.85) Ref: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlsecurezeromemory - always enable `LIBSSH2_CLEAR_MEMORY` on Windows. CMake and curl-for-win builds already did that. Delete `SecureZeroMemory()` detection from autotools' WinCNG backend logic, that this setting used to depend on. TODO: Enable it for all platforms in a separate PR. TODO: For clearing buffers in WinCNG, call `_libssh2_explicit_zero()`, insead of a local function or explicit `SecureZeroMemory()`. - Makefile.inc: move `os400qc3.h` to `HEADERS`. This fixes compilation on non-unixy platforms. Recent regression. - `libssh2.rc`: replace copyright with plain ASCII, as in curl. Ref: curl/curl@1ca62bb Ref: curl/curl#7765 Ref: curl/curl#7776 - CMake fixes and improvements: - enable warnings with llvm/clang. - enable more comprehensive warnings with gcc and llvm/clang. Logic copied from curl: https://github.com/curl/curl/blob/233810bb5f6c5e7bedfc10bdd36607b958c0cfe4/CMakeLists.txt#L131-L148 - fix `Policy CMP0080` CMake warning by deleting that reference. - add `ENABLE_WERROR` (default: `OFF`) option. Ported from curl. - add `PICKY_COMPILER` (default: `ON`) option, as known from curl. It controls both the newly added picky warnings for llvm/clang and gcc, and also the pre-existing ones for MSVC. - `win32/GNUmakefile` fixes and improvements: - delete `_AMD64_` and add missing `-m64` for x64 builds under test. - add support for `ARCH=custom`. It disables hardcoded Intel 64-bit and Intel 32-bit options, allowing ARM64 builds. - add support for `LIBSSH2_RCFLAG_EXTRAS`. To pass custom options to windres, e.g. in ARM64 builds. - add support for `LIBSSH2_RC`. To override `windres`. - delete support for Metrowerks C. Last released in 2004. - `win32/libssh2_config.h`: delete unnecessary socket #includes `src/libssh2_priv.h` includes `winsock2.h` and `ws2tcpip.h` further down the line, triggered by `HAVE_WINSOCK2_H`. `mswsock.h` does not seem to be necessary anymore. Double-including these (before `windows.h`) caused compiler failures when building against BoringSSL and warnings with LibreSSL. We could work this around by passing `-DNOCRYPT`. Deleting the duplicates fixes these issues. Timeline: 2013: c910cd3 deleted `mswsock.h` from `src/libssh2_priv.h` 2008: 8c43bc5 added `winsock2.h` and `ws2tcpip.h` to `src/libssh2_priv.h` 2005: dc4bb1a added the now deleted #includes - delete or replace `LIBSSH2_WIN32` with `WIN32`. - replace hand-rolled `HAVE_WINDOWS_H` macro with `WIN32`. Also delete its detections/definitions. - delete unused `LIBSSH2_DARWIN` macro. - delete unused `writev()` Windows implementation There is no reference to `writev()` since 2007-02-02, commit 9d55db6. - fix a bunch of MSVC / llvm/clang / gcc compiler warnings: - `warning C4100: '...': unreferenced formal parameter` - using value of undefined PP macro `LIBSSH2DEBUG` - missing void from function definition - `if()` block missing in non-debug builds - unreferenced variable in non-debug builds - `warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]` in `_libssh2_debug()` - `warning C4295: 'ciphertext' : array is too small to include a terminating null character` - `warning C4706: assignment within conditional expression` - `warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings` By suppressning it. Would be best to use inet_pton() as suggested. On Windows this needs Vista though. - `warning C4152: nonstandard extension, function/data pointer conversion in expression` (silenced locally) - `warning C4068: unknown pragma` Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46354480/job/j7d0m34qgq8rag5w Closes libssh2#808
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in
hostkey.ccheck the result oflibssh2_sha256_init()andlibssh2_sha512_init()calls. This avoid the warning that we'reignoring the return values.
fix code using
int(orSOCKET) for sockets. Use libssh2'sdedicated
libssh2_socket_tandLIBSSH2_INVALID_SOCKETinstead.fix compiler warnings due to
STATUS_*macro redefinitions betweenntstatus.h/winnt.h. Solve it by manually defining the singleSTATUSvalue we need fromntstatus.hand stop including the wholeheader.
Fixes Fix macro redefinition warnings on MSVC #733
improve Windows UWP/WinRT builds by detecting it with code copied
from the curl project. Then excluding problematic libssh2 parts
according to PR by Dmitry Kostjučenko.
Fixes Fix compile for Windows UWP/WinRT platform. #734
always use
SecureZeroMemory()on Windows.We can tweak this if not found or not inlined by a C compiler which
we otherwise support. Same if it causes issues with UWP apps.
Ref: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa366877(v=vs.85)
Ref: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlsecurezeromemory
always enable
LIBSSH2_CLEAR_MEMORYon Windows. CMake andcurl-for-win builds already did that. Delete
SecureZeroMemory()detection from autotools' WinCNG backend logic, that this
setting used to depend on.
TODO: Enable it for all platforms in a separate PR.
TODO: For clearing buffers in WinCNG, call
_libssh2_explicit_zero(),insead of a local function or explicit
SecureZeroMemory().Makefile.inc: moveos400qc3.htoHEADERS. This fixescompilation on non-unixy platforms. Recent regression.
libssh2.rc: replace copyright with plain ASCII, as in curl.Ref: curl/curl@1ca62bb
Ref: Compiling with Clang on Windows fails at libcurl.rc curl/curl#7765
Ref: libcurl.rc: switch out the copyright symbol for plain ASCII curl/curl#7776
CMake fixes and improvements:
enable warnings with llvm/clang.
enable more comprehensive warnings with gcc and llvm/clang.
Logic copied from curl:
https://github.com/curl/curl/blob/233810bb5f6c5e7bedfc10bdd36607b958c0cfe4/CMakeLists.txt#L131-L148
fix
Policy CMP0080CMake warning by deleting that reference.add
ENABLE_WERROR(default:OFF) option. Ported from curl.add
PICKY_COMPILER(default:ON) option, as known from curl.It controls both the newly added picky warnings for llvm/clang and
gcc, and also the pre-existing ones for MSVC.
win32/GNUmakefilefixes and improvements:_AMD64_and add missing-m64for x64 builds under test.ARCH=custom.It disables hardcoded Intel 64-bit and Intel 32-bit options,
allowing ARM64 builds.
LIBSSH2_RCFLAG_EXTRAS.To pass custom options to windres, e.g. in ARM64 builds.
LIBSSH2_RC. To overridewindres.win32/libssh2_config.h: delete unnecessary socket #includessrc/libssh2_priv.hincludeswinsock2.handws2tcpip.hfurtherdown the line, triggered by
HAVE_WINSOCK2_H.mswsock.hdoes not seem to be necessary anymore.Double-including these (before
windows.h) caused compiler failureswhen building against BoringSSL and warnings with LibreSSL. We could
work this around by passing
-DNOCRYPT. Deleting the duplicatesfixes these issues.
Timeline:
2013: c910cd3 deleted
mswsock.hfromsrc/libssh2_priv.h2008: 8c43bc5 added
winsock2.handws2tcpip.htosrc/libssh2_priv.h2005: dc4bb1a added the now deleted #includes
delete or replace
LIBSSH2_WIN32withWIN32.replace hand-rolled
HAVE_WINDOWS_Hmacro withWIN32. Also deleteits detections/definitions.
delete unused
LIBSSH2_DARWINmacro.delete unused
writev()Windows implementationThere is no reference to
writev()since 2007-02-02, commit9d55db6.
fix a bunch of MSVC / llvm/clang / gcc compiler warnings:
warning C4100: '...': unreferenced formal parameterLIBSSH2DEBUGif()block missing in non-debug buildswarning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]in
_libssh2_debug()warning C4295: 'ciphertext' : array is too small to include a terminating null characterwarning C4706: assignment within conditional expressionwarning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warningsBy suppressning it. Would be best to use inet_pton() as suggested.
On Windows this needs Vista though.
warning C4152: nonstandard extension, function/data pointer conversion in expression(silenced locally)
warning C4068: unknown pragmaRef: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46354480/job/j7d0m34qgq8rag5w