-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add built in post quantum functionality #2022
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 built in post quantum functionality #2022
Conversation
we have several way of linking against openssl. we do not rebuild openssl always (but it is one of alternatives) |
in theory we can even link against libressl (but it's not a common case) |
Yes, I understand. My changes are only to do with building in oqsprovider functionality, and they don't change anything about how OpenSSL is linked. On Windows, to the best of my knowledge, OpenSSL is linked statically, while on Linux, OpenSSL is dynamic. My changes don't affect how OpenSSL is linked at all, but only make sure that oqsprovider and liboqs are built in statically. For the LibreSSL edge case, I can disable oqsprovider and liboqs building, if that's not already accomplished by the most recent commit 1f9ce6f |
meanwhile Fedora build failed https://github.com/chipitsine/SoftEtherVPN/actions/runs/9782220953/job/27008057484 |
well, what am I afraid of is keeping an eye on updating git submodules (to keep them in sync with openssl). |
I overlooked trigger definition in Fedora pipeline. here's fix: #2025 |
Is the Fedora build working now, or do I need to push another commit to see it fail? For updating the git submodules, I don't think OpenSSL would break backwards compatibility that quickly, but if it's necessary, then of course I will come back and update them. |
in Fedora openssl is built without provider support (but openssl >= 3) I can prepare fix tomorrow. Fedora pipeline was not enabled for pull requests, thus we missed that regression |
68e332a
to
0491203
Compare
After doing a bit of searching, I can't find any option to build OpenSSL without providers. It's doesn't seem to be in OpenSSL's ./Configure. Is the problem something related to engine support instead? |
I did some digging, and I found the problem. I found your test commit to add
This seems to be completely correct, and should work properly. The only problem is that I think the simplest solution is this: |
we can mimic OPENSSL_NO_ENGINE in cmake, |
I'll try installing openssl-devel-engine as well |
The fix isn't very related to this pull request, but it might as well go here. What did you mean by
|
I thought it was not a bug but intended behaviour. in case it is a bug, let's stay with your approach by installing package on Fedora |
I can accept Fedora pipeline fix immediately. as for rest, it looks good, but I would have more look at it (well, I do not like an idea to add more submodules, but it seems to be the way those libs are served nowdays) |
Ok, I can revert the commit here and make a separate pull request, which is probably best practice anyway. |
This reverts commit 1d57ccf.
About the git submodules, would CMake's FetchContent be an alternative? As far as I understand the library could be downloaded already compiled and then used that way. Would this work as an alternative? |
since most people serve it as submodules, let's stick with submodules |
d7a795c
to
d4d20e4
Compare
Sorry, made a bad commit and accidentally pushed |
No, I'm not doing any active work, I was working on my master branch and accidentally pushed to this one. |
I'll try to merge today |
thank you for contribution! |
This pull request adds post quantum functionality in SoftEtherVPN by default for all users. My previous pull request previously added post quantum functionality, but in order for that to work, OpenSSL had to be dynamically installed, and so did oqsprovider, which depends on liboqs. What this meant for Windows users is that they would have had to install OpenSSL, and then build not just oqsprovider, but liboqs as well. All of these would have to be built from source BEFORE any post quantum functionality was available. Even on Linux, almost no distributions package liboqs or oqsprovider, so both of those would still have to be built from source. This is too much to expect a user to do.
So, to solve this problem, I integrated oqsprovider statically, so that it is built in by default by adding new git submodules for oqsprovider and liboqs. However, oqsprovider uses cmake's find_package to depend on liboqs. Because liboqs will not be installed on the user's system, this will fail, so Findliboqs.cmake had to be added to src/Mayaqua/3rdparty/, following this CMake workaround. I'm pretty new to writing CMake, so I'm not sure my code there is the most optimal way to build oqsprovider and make it depend on liboqs, but I've checked that it builds and runs properly on both Linux and Windows.