-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Support OpenSSL on Windows #11477
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
Merged
straight-shoota
merged 4 commits into
crystal-lang:master
from
HertzDevil:feature/windows-openssl
Nov 23, 2021
Merged
Support OpenSSL on Windows #11477
straight-shoota
merged 4 commits into
crystal-lang:master
from
HertzDevil:feature/windows-openssl
Nov 23, 2021
Conversation
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
oprypin
reviewed
Nov 20, 2021
{% if flag?(:win32) %} | ||
@[Link("crypto")] | ||
@[Link("crypt32")] # CertOpenStore, ... | ||
@[Link("user32")] # GetProcessWindowStation, GetUserObjectInformationW, _MessageBoxW |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking here seems unfortunate, particularly for _MessageBoxW
:/
But seems like it couldn't be declared within OpenSSL itself?
https://github.com/openssl/openssl/blob/3e3ad3c54855dd534437871a0c78858de5e3d246/NOTES-WINDOWS.md?plain=1#L207
Co-authored-by: Oleh Prypin <[email protected]>
oprypin
approved these changes
Nov 20, 2021
straight-shoota
approved these changes
Nov 20, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind:feature
platform:windows
Windows support based on the MSVC toolchain / Win32 API
topic:stdlib:crypto
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.
This PR adds OpenSSL 3.0.0 to Windows CI as a static library. Unlike on Linux, we do not have
pkg-config
on Windows, but we do have full control over the exact libraries used by Crystal, so this PR simplyoutputs the OpenSSL version number somewhere inretrieves the version number from theCrystal::LIBRARY_PATH
as part of the setup process, then uses theread_file?
macro method to retrieve it atLibCrypto
andLibSSL
CRYSTAL_OPENSSL_VERSION
environment variable.Building OpenSSL locally in the same manner as CI requires Strawberry Perl and NASM. Although this PR doesn't have it, I have also tried LibreSSL myself and everything works too (that one uses CMake and the Microsoft assembler).
OPENSSLDIR
is left intact (C:\Program Files\Common Files\SSL
).This enables 295 passing and 2 pending examples, such as the remaining digest algorithms, in the standard library test suite.