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

MSVC: Fixes from vcpkg #912

Closed
wants to merge 2 commits into from
Closed

Conversation

FtZPetruska
Copy link
Contributor

MSVC currently has two patches for its LibreSSL port.

The first patch enables building ocspcheck with MSVC. This requires:

  • getopt, which is already included in libcrypto. Adding optarg and optind to the DLL exports is necessary.
  • ftruncate, which is already included in libtls. Adding it to the DLL exports is necessary.
  • Defining STDIN_FILENO in the unistd.h compat header.

The second patch handles the Spectre vulnerability mitigation. The warning C5045 triggers whether /Qspectre is used or not and warns about code that may be affected by this vulnerability.

busterb added a commit to busterb/portable that referenced this pull request Oct 2, 2023
- Add `STDIN_FILENO` to compat unistd header.
- Use quotes to include compat getopt header in the compat unistd.
- Export additional symbols needed by ocspcheck (optarg, optind,
  ftruncate)
- Add `/Qspectre` to CFLAGS.
- Silence C5045, it triggers whether `/Qspectre` is enabled or not.
@busterb
Copy link
Contributor

busterb commented Oct 29, 2023

Hi, thanks for the PR. I think for now would like to leave the Spectre mitigation off by default, not because we don't want it, but it seems that the VS environment being built in needs to have additional libraries installed, and the check for version isn't sufficient to check for the libraries as well.

@busterb busterb self-assigned this Oct 29, 2023
@busterb
Copy link
Contributor

busterb commented Oct 29, 2023

I cherry-picked the oscpcheck fixes in c4bb6b7, thanks!

Let's discuss the spectre mitigations in another PR. I'm not sure if we really want this to happen automatically or intentionally on behalf of the builder.

@busterb busterb closed this Oct 29, 2023
@FtZPetruska FtZPetruska deleted the msvc-fixes branch October 29, 2023 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants