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

Windows support (WiP) #4018

Open
SamuelMarks opened this issue May 24, 2023 · 2 comments
Open

Windows support (WiP) #4018

SamuelMarks opened this issue May 24, 2023 · 2 comments

Comments

@SamuelMarks
Copy link

Here's my WiP - https://github.com/SamuelMarks/s2n-tls/tree/windows

Problem:

You don't support Windows

Solution:

Add support for Windows.

  • Does this change what S2N sends over the wire? Nah
  • Does this change any public APIs? Maybe a little for standard UNIX/Linux headers now exposed functions on Windows
  • Which versions of TLS will this impact? N/A

Requirements / Acceptance Criteria:

What must a solution address in order to solve the problem? How do we know the solution is complete? - When it builds for Windows (and the test pass I guess!)

Out of scope:

Is there anything the solution will intentionally NOT address?


So yeah anyway if you want me to keep going just say the word and I'll see if I can't get it as far as successful build. Might even try for all of MSVC 2022, Cygwin, and MinGW.

@camshaft
Copy link
Contributor

camshaft commented Jun 1, 2023

If you can get it building, we'd be more than happy to accept the PR! One thing you'll probably run into, though, is we use cleanup attributes quite extensively, which last I checked were not supported by MSVC.

@SamuelMarks
Copy link
Author

Ah yes, this thing:

#define DEFER_CLEANUP(_thealloc, _thecleanup) \
    __attribute__((cleanup(_thecleanup))) _thealloc

It's a bit hacky but I'm confident macros could solve the issue. Also there are only 1381 odd usages, so shouldn't be more than an afternoon to resolve issues.


Cool now that I know you're interested I'll put some time to this PR and have it for you ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants