vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

Custom Openssl Installation

Open Ashwin609 opened this issue 1 year ago • 4 comments

Describe the bug I am using vcpkg for windows to build openvpn from source code on windows. Now for this i already have openssl installed, but i am not able to use this custom openssl instead vcpkg install always installs new openssl. How can i use my custom openssl.

Ashwin609 avatar Sep 19 '24 06:09 Ashwin609

You could find system openssl by CMake function https://cmake.org/cmake/help/latest/module/FindOpenSSL.html, you may also need to specify the search path.

WangWeiLin-MV avatar Sep 19 '24 07:09 WangWeiLin-MV

The general answer to such situations is to provide an empty overlay port (here: for openssl). Cf. https://devblogs.microsoft.com/cppblog/using-system-package-manager-dependencies-with-vcpkg/#using-curl-and-openssl-from-the-system-package-manager

Note that that vcpkg's openssl port also installs a wrapper for find_package(OpenSSL) which deals with correctly supplying debug and release binaries etc. When not using the vcpkg port, reverse dependencies might fail to build or might link the wrong configuration.

dg0yt avatar Sep 19 '24 07:09 dg0yt

You could find system openssl by CMake function https://cmake.org/cmake/help/latest/module/FindOpenSSL.html, you may also need to specify the search path.

This misses the point of the question.

dg0yt avatar Sep 19 '24 07:09 dg0yt

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar Oct 18 '24 02:10 github-actions[bot]

Hi, any plans for this? I tried cloning and modifying the project by adding OpenSSL and some OVPNDCO options in CMake, as well as setting the overlay path in my MSVC vcpkg additional options.

It compiles successfully, but I still can't connect to my OpenVPN server. Additionally, running --version does not show DCO support.

This library deserves more flexibility and serious development. Why is MbedTLS forced as the default?

rizkyblackhat avatar Feb 08 '25 13:02 rizkyblackhat

~@rizkyblackhat Make a proper new issue or discussion.~

dg0yt avatar Feb 08 '25 15:02 dg0yt

(I see, still the same question.) Well, FTR the proper answer is: Use an (almost) empty overlay port for openssl. Satisfying vcpkg dependency resolution, but not providing an openssl installation.

dg0yt avatar Feb 08 '25 15:02 dg0yt