06 Feb 2023 04:09 PM - last edited on 07 Feb 2023 02:12 AM by Ana_Kuzmenchuk
When using pyOpenSSL in a Windows ActiveGate extension, it seems not to work because pyOpenSSL seems to have a dependency on Rust. Has anyone come across it, and know the best way to get around it? Do I have to install Rust to get this working?
The errors I'm getting are like this:
ImportError: cannot import name 'x509' from 'cryptography.hazmat.bindings._rust' (unknown location)
Have also tried to fix a lower version of pyOpenSSL without success...
Solved! Go to Solution.
Hi - we are also getting this error so any info would be valuable - also on Windows OS
Yes, on a 64 bit machine, but not built in Windows, but Linux. Might be an issue?
I also tried several "install_requires" with older pyOpenSSL versions, but that didn't do the trick...
Yup, that is the problem. It always needs to be built on the same OS as it runs whenever you have native libraries.
Thanks for your quick reply! That brings up an issue that I believe I have not seen yet before in the documentation, and what are limits to cross-platform support with Dynatrace extensions. I believe this case of mine to be specific to pyOpenSSL, because it really needs the cryptographic engine, but are there other cases that we should be aware, not to make the same mistake?
And, if eventually an extension like this makes it to the Hub, how would we be able to distinguish between Linux/Windows ActiveGates?
Any extension which includes a library with a native component needs to be built on the OS where it will run. There are quite many libraries which have a native file, curious that you didn’t think run into it before.
Once you built it for Windows you can grab the OS specific files and drop it into your Linux build and then it will work for both. That is how we handle hub extensions (except that we have some automation scripts around it).
As always, I particularly value your comments 🤗 Really hadn't noticed the issue before, but well, maybe it just gives out an non-understandable error, in the few cases where I see Windows ActiveGates being used. Well, in this particular client we have several extensions still with problems, some of them from Dynatrace. Initially, there were also problems with non-9999 port being used, but now I have another clue for those...
BTW, couldn't the build process take care of this? Maybe I'll file a Product Idea later
The build process of EF2.0 Python extensions takes care of it 👍