-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[question] How to use openssl/3.2.1
with the FIPS module from openssl/3.0.8
#22796
Comments
FYI @uilianries @RubenRBS @grafikrobot @Hopobcn @Croydon @jcar87 |
@uilianries @RubenRBS @grafikrobot @Hopobcn @Croydon @jcar87, I know your busy, but any thoughts on this? Thx! |
I have no idea about openssl. |
I hear you, but this is actually a bit broader than
I guess my point is, there are rare cases (like this one), when it may be warranted to |
Your workaround with using one as a build_requirement and one as a requirement is probably the only way currently, everything else needs a change in Conan itself. But why would you ever mix two different versions of OpenSSL in one build? If you care about FIPS then you care about certification, why would you want to use a non-certificate version at the same time in the same application? |
Thanks @Croydon! My understanding (coming from our internal security expert @kulkarniamit) is that, for the FIPS certification to be valid, one must use the exact version of the fips module (i.e. Thinking about it, another approach could be to allow for some kind of recipe "alias". In other words, we could have an This way, we could have the following:
This could be an elegant way to solve this whole thing, but at the conan center level and just for that specific openssl-related situation. Would you guys be open to that? I could work on a PR... That alias recipe could do more or less... 1) It could literally just be pointing back to the LMK. Thanks! |
After a quick googling, it appears that both |
The FIPS Provider contains a subset of the algorithm implementations available in the default provider. The FIPS Provider only includes algorithms that have been FIPS 140-2 validated, while the default provider includes a broader set of algorithms. So, the combination of using the OpenSSL 3.0.8 FIPS Provider along with the latest OpenSSL 3.x can provide the following benefits for applications:
|
Ok, I've done a quick/rough PoC for a possible way to address this. Check it out and let me know. thx! |
Aren't you losing this aspect in the very moment, where you are adding and using regular-non-FIPS OpenSSL components? |
@Croydon, I hear what you're saying.. (and agree), but, somehow this seems to be the recommended practice by the OpenSSL devs. See here for an example (back when only 3.0.0 was FIPS and the latest non-FIPS was 3.0.8). @kulkarniamit may be able to provide better pointers from the docs... |
This removes some hardcoded names and allows for the package to be "renamed" more easily... For example if one wanted to create a distinct `openssl-fips` package so as to use it in conjunction with the standard `openssl` package without any collision. See conan-io#22796 for more context
This removes some hardcoded names and allows for the package to be "renamed" more easily... For example if one wanted to create a distinct `openssl-fips` package so as to use it in conjunction with the standard `openssl` package without any collision. See conan-io#22796 for more context
@Croydon, see my minor tweak/improvement here to the
This allows me to run the following command:
It all works, but with a key issue... for this to work I to do two things:
Obviously, some package name customization mechanism would need to be provided by the conan center... i.e. it could either pick up the name from the folder name (when not specified in the recipe) or from the config.yaml maybe? Overall, I believe this whole mechanism would be very low effort, have no redundancy in the recipe definition (there would still only be one openssl recipe) and it does beautifully address exactly this "unusual" requirement from the OpenSSL package... Any thoughts? |
FIPS provider in OpenSSL 3 is a dynamically loadable provider. Applications can offer a switch/option to enable/disable FIPS provider offering a choice between FIPS approved implementations and regular non-fips components. This would allow users to switch between fips and default provider (non-fips) implementations based on their regulatory compliance requirements. |
This removes some hardcoded names and allows for the package to be "renamed" more easily... For example if one wanted to create a distinct `openssl-fips` package so as to use it in conjunction with the standard `openssl` package without any collision. See conan-io#22796 for more context
This removes some hardcoded names and allows for the package to be "renamed" more easily... For example if one wanted to create a distinct `openssl-fips` package so as to use it in conjunction with the standard `openssl` package without any collision. See conan-io#22796 for more context
This removes some hardcoded names and allows for the package to be "renamed" more easily... For example if one wanted to create a distinct `openssl-fips` package so as to use it in conjunction with the standard `openssl` package without any collision. See conan-io#22796 for more context
It may be possible for the The below snipped does address the issue that you mentioned about the host context.
I believe the FIPS certification involves some sort of testing to validate it's working properly, this would have to be done both at package time (with This involves the openssl recipe depending on an earlier version of itself, in a way that is visible only to itself and does not propagate nor pollute the build process. If this doesn't currently work we are exploring the possibility of addressing this in the next Conan 2 release. There's some questions around option propagation that we need to consider, which also reinforces the notion of running the tests at package time and the consumer test in test_package. This would avoid having to make further changes to the recipe/cmake, in particular the complexity surrounding having two references from the same recipe file. If this is something that can be fixed in the recipe with Conan features, let's do it :D |
Yes, I like this a lot and I do think it would be the most elegant, logical and easiest way to provide the openssl package with the proper FIPS module... Thx! |
Thanks @gegles - thank you for providing details and for experimenting with this, it's been really helpful. |
@gegles - We are experimenting with the feature on this branch: https://github.com/conan-io/conan/pull/16132/files If you are willing to try it out, you can probably install it in a python virtual environment with
Key points:
|
Does anyone have some working prototype? I wonder how override/force will work in case of several versions. |
@Nekto89, I haven't gotten around to write that updated recipe with the You bring up a good point... I guess override/force would change the main version of the package, but the version of the validated fips used would remain the same "hardcoded" 3.0.8 ... |
Just for history:
|
What is your question?
We are trying to create a FIPS compliant app. For that, we want to use the latest
openssl/3.2.1
package viaself.requires("openssl/3.2.1")
but we also need to package the FIPS module (i.e.fips.so
orfips.dll
orfips.dylib
) from the officially supported version, i.e.openssl/3.0.8
. See the official OpenSSL doc:My initial solution (that sorta works) was the following:
This sorta works, except for when cross-compiling (i.e. macOS Silicon -> Intel). Indeed, the fips module will be of the
build
arch type (armv8
) instead of thehost
arch type (x86_64
).Ideally, it would be great if we could somehow
self.requires()
2 different versions of the same package, but that might be tricky.Otherwise, is there a way (as part of the conanfile.py and using simple methods) to merely download a separate version of a package and extract what's needed out of it?
The text was updated successfully, but these errors were encountered: