Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UWP has no lstrlenW function #2994

Closed
borrrden opened this issue Jan 21, 2020 · 2 comments · Fixed by #7081
Closed

UWP has no lstrlenW function #2994

borrrden opened this issue Jan 21, 2020 · 2 comments · Fixed by #7081
Labels
bug component-platform Portability layer and build scripts help-wanted This issue is not being actively worked on, but PRs welcome. historical-reviewing Currently reviewing (for legacy PR/issues)

Comments

@borrrden
Copy link

Note: This is just a template, so feel free to use/remove the unnecessary things

Description

  • Type: Bug
  • Priority: Unable to compile means Blocker I guess, but the way to fix in a fork is pretty easy so maybe minor?

Bug

OS
Windows (Compiling for Windows Store)

mbed TLS build:
Version: 2.19.1 (But same thing is still present in master)
OS version: 10.0.18362
Configuration: https://gist.github.com/borrrden/e9e01b5703c450e789c8b2566709c2af
Compiler and options: MSVC 19.16.27034.0
Additional environment information:

Peer device TLS stack and version
OpenSSL|GnuTls|Chrome|NSS(Firefox)|SecureChannel (IIS/Internet Explorer/Edge)|Other
Version: ???

Expected behavior

Compiles correctly

Actual behavior

Doesn't compile, no function definition for lstrlenW (x509_crt.c)

Steps to reproduce

Make a CMake build as in the following:

cmake -G"Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION="10.0.16299.0"

@erossetto
Copy link

I was having the same issue, check:

#1227 (comment)

@gilles-peskine-arm
Copy link
Contributor

Hi @borrrden , @erossetto ,

There's a fix pending for this issue in #1453 . Unfortunately, that pull request does many things, got delayed several times and has accumulated a lot of conflicts. We don't have much Windows expertise on the team, and we don't have much time to spend on it.

Would you mind helping us with this by contributing a fix?

  • The smaller the code change, the easier it is to review.
  • Please make sure not to break support for older Windows environments. We currently support Visual Studio back to Visual Studio 2013.
  • That cmake command line is very helpful. We should add a Windows build to our CI that catches this problem. What versions of Visual Studio, cmake and other tools does it require? We currently have up to Visual Studio 2017. Would we need to install a more recent version?

@gilles-peskine-arm gilles-peskine-arm added bug component-platform Portability layer and build scripts help-wanted This issue is not being actively worked on, but PRs welcome. labels Aug 11, 2020
@tom-cosgrove-arm tom-cosgrove-arm added the historical-reviewing Currently reviewing (for legacy PR/issues) label Feb 9, 2023
tom-cosgrove-arm added a commit to tom-cosgrove-arm/mbedtls that referenced this issue Feb 10, 2023
The lstrlenW() function isn't available to UWP apps, and isn't necessary, since
when given -1, WideCharToMultiByte() will process the terminating null character
itself (and the length returned by the function includes this character).

Resolves Mbed-TLS#2994

Signed-off-by: Tom Cosgrove <[email protected]>
tom-cosgrove-arm added a commit to tom-cosgrove-arm/mbedtls that referenced this issue Feb 10, 2023
The lstrlenW() function isn't available to UWP apps, and isn't necessary, since
when given -1, WideCharToMultiByte() will process the terminating null character
itself (and the length returned by the function includes this character).

Resolves Mbed-TLS#2994

Signed-off-by: Tom Cosgrove <[email protected]>
sergio-nsk pushed a commit to sergio-nsk/mbedtls that referenced this issue Feb 16, 2023
The lstrlenW() function isn't available to UWP apps, and isn't necessary, since
when given -1, WideCharToMultiByte() will process the terminating null character
itself (and the length returned by the function includes this character).

Resolves Mbed-TLS#2994

Signed-off-by: Tom Cosgrove <[email protected]>
lhuang04 pushed a commit to lhuang04/mbedtls that referenced this issue May 13, 2024
The lstrlenW() function isn't available to UWP apps, and isn't necessary, since
when given -1, WideCharToMultiByte() will process the terminating null character
itself (and the length returned by the function includes this character).

Resolves Mbed-TLS#2994

Signed-off-by: Tom Cosgrove <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component-platform Portability layer and build scripts help-wanted This issue is not being actively worked on, but PRs welcome. historical-reviewing Currently reviewing (for legacy PR/issues)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants