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] LibreSSL DLL Missing Compat Functions #1087

Closed
tgauth opened this issue Aug 21, 2024 · 1 comment
Closed

[Windows] LibreSSL DLL Missing Compat Functions #1087

tgauth opened this issue Aug 21, 2024 · 1 comment

Comments

@tgauth
Copy link

tgauth commented Aug 21, 2024

I pulled LibreSSL 3.9.2 for use in Win32-OpenSSH. When I try to compile Win32-OpenSSH with LibreSSL dynamically linked, there are unresolved external symbols for arc4random, arc4random_buf, arc4random_uniform, explicit_bzero, gettimeofday, and timegm.

I think this is related to stop exporting compat functions - 8489508

Any guidance on if this change is indeed related, and if there's any suggestions for how resolve would be appreciated!
If we continue compiling LibreSSL as-is, without the functions exported, then I imagine we'll need to define them in Win32-OpenSSH instead, but wanted to ask for input before going down this route. Apologies if this is not the right forum to ask about this.

@botovq
Copy link
Contributor

botovq commented Aug 21, 2024

This is indeed a consequence of this change.

We had various complaints over the years because of collisions with symbols that don't really belong to libcrypto, both in static and dynamic contexts.

While we need most of the functions you list internally -- the dependency on timegm was eliminated and the compat code removed in f9874d4 -- they don't really belong to libcrypto proper and we do not consider them to be part of our API. Contrary to what some other projects with shared ancestry seem to believe, it is not libcrypto's job to figure as an ersatz libc.

Therefore we removed these dynamic exports and started prefixing our compat symbols with libressl_ to avoid conflicts in static links, see #928.

I think the clean solution is for Win32-OpenSSH to maintain its own compat symbols, which you can readily pick from ours (be aware that our gettimeofday currently has a year 2038 bug - see #1078). I do not think we really want to provide an option to export (some of) our compat symbols.

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

No branches or pull requests

2 participants