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

Add openssl3 support for msvc build #471

Merged
merged 1 commit into from
Feb 2, 2022
Merged

Conversation

lstipakov
Copy link
Member

@lstipakov lstipakov commented Jan 24, 2022

Add openssl3 support for msvc build

  • remove vcpkg manifest and use whatever openssl
    version is installed. To build with openssl3, one could
    use openssl3 port from openvpn/contrib/vcpkg-ports.

  • build with openssl1.1.1 and openssl3 in GitHub Actions

Copy link
Collaborator

@selvanair selvanair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with vcpkg or its ports, but can we avoid adding files with hard-coded library versions (e.g., OpenSSl 3.0.1) ? Building with a newer version of OpenSSL would require changes hare and then matching changes in OpenVPn core too, isn't it? That doesn't sound the right approach to me.

Can we have a common vcpkg port that could be used here as well as in the core. Or add this to openvpn-build?

@lstipakov
Copy link
Member Author

Ideally we should not host any ports ourselves and use openssl3 port provided by vcpkg official repo, which is already long overdue. microsoft/vcpkg#20031

We could use vcpkg port from openvpn repo, but that would require dependency to openvpn when building openvpn-gui with openssl3. This should not be a problem for release building since we checkout all repos. For GitHub Actions we could have a bit ugly solution of cloning openvpn before building openvpn-gui. I think we can live with it until openssl3 is added into vcpkg.

I am also thinking that we need to support building openvpn-gui with both openssl1.1.1 and openssl3. Right now we use vcpkg manifest mode (the recommended way), where we explicitly list dependencies which are automatically installed, and we list openssl3. Maybe we should drop it and use whatever openssl library is installed.

@lstipakov
Copy link
Member Author

Also let GitHub Actions build with both flavors - openssl1.1.1 and openssl3.

@cron2
Copy link
Contributor

cron2 commented Jan 25, 2022 via email

@lstipakov
Copy link
Member Author

No, nothing is installed. But that's not an issue - vcpkg install openssl and vcpkg install openssl3 do the thing. And with caching it doesn't take time.

@cron2
Copy link
Contributor

cron2 commented Jan 25, 2022 via email

@lstipakov
Copy link
Member Author

Ah, I mean whatever is "somehow" installed before building gui - the same thing we do with openvpn, where one needs to run vcpkg install openssl or vcpkg install openssl3 before building openvpn.

For gui it was different - we listed dependencies (openssl) which got automatically installed as part of gui build process. But since we need to build both flavors (with openssl and openssl3), this approach doesn't work anymore.

@lstipakov lstipakov changed the title msvc: move to openssl3 Add openssl3 support for msvc build Jan 25, 2022
@lstipakov
Copy link
Member Author

Force-pushed a new version.

@lstipakov
Copy link
Member Author

Gentle ping @selvanair. Note that there are no changes (anymore) to the code.

Copy link
Collaborator

@selvanair selvanair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for the openvpn repo name. Shall we wait for the openssl3 port to get merged to OpenVPN?

By the way, we could add a few lines in BUILD.rst about build using vcpkg. Need not be in this PR, though.

.github/workflows/msbuild.yml Outdated Show resolved Hide resolved
 - remove vcpkg manifest and use whatever openssl
 version is installed. To build with openssl3, one could
 use openssl3 port from openvpn/contrib/vcpkg-ports.

 - build with openssl1.1.1 and openssl3 in GitHub Actions

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Copy link
Collaborator

@selvanair selvanair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now.

@cron2 cron2 merged commit d27fd21 into OpenVPN:master Feb 2, 2022
@lstipakov lstipakov deleted the ossl3 branch February 2, 2022 18:46
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.

3 participants