cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

pyOpenSSL in Windows ActiveGate extension not working because of Rust

AntonioSousa
DynaMight Guru
DynaMight Guru

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...

Any ideas?

Antonio Sousa
9 REPLIES 9

CDoorbar83
Observer

Hi - we are also getting this error so any info would be valuable -   also on Windows OS 

Mike_L
Dynatrace Guru
Dynatrace Guru

Hi,

Did you make sure that you built the plugin on a 64-bit windows machine? That should download the correct files to run it on Windows.

Mike

Mike

@Mike_L,

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...

Antonio Sousa

Yup, that is the problem. It always needs to be built on the same OS as it runs whenever you have native libraries.

Mike

@Mike_L,

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?

Antonio Sousa

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).

Mike

 

Mike

@Mike_L,

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...

Antonio Sousa

@Mike_L,

BTW, couldn't the build process take care of this? Maybe I'll file a Product Idea later :dynaspin:

Antonio Sousa

The build process of EF2.0 Python extensions takes care of it 👍

Mike

Featured Posts