microsoft / microsoft/vcpkg

[openssl:x64-windows] Provider legacy cannot be loaded

Open
#43,314 3 comments 0 reactions 1 assignee Claimed by @MonicaLiu0311 View on GitHub
category:port-bug
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description

### Is your feature request related to a problem? Please describe.

The legacy provider is not found when built dynamically, most likely the search path is hardcoded to the original install dir.

This occurs for instance with `py-requests-kerberos` from https://github.com/open-vcpkg/python-registry is installed but also in
other scenarios, see https://github.com/microsoft/vcpkg/issues/34949.

Typically, this happens if a cached openssl is used in a different install tree.

To workaround the issue, one can use a couple of approaches, either in the use application or with an env var, see https://github.com/openssl/openssl/issues/18212.

Tested workaround: `set(ENV{OPENSSL_MODULES} "${CURRENT_INSTALLED_DIR}/bin")`

### Proposed solution

openssl should be patched to be relocatable and support providers also when used from a different install tree.
Either in vcpkg, even better upstream.

### Describe alternatives you've considered

https://github.com/microsoft/vcpkg/issues/34949 discusses the alternative to build providers statically even if the port is built as dynamic, it remains unclear if this is a supported configuration by upstream, but would likely also fix the imminent issue.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.