Question

I'm building a cross-platform Java project that has to reference some python2.7 scripts. Jython seems perfect for this, but there are a couple problems: the python script uses M2Crypto. Is there any way to include M2Crypto into Jython in a way that's natively cross platform and doesn't require installing any extra programs?

EDIT: To be specific, this is the file that's giving me problems:
https://raw.github.com/GotoHack/pymobiledevice/master/ca.py

Was it helpful?

Solution

This won't work ... M2Crypto is a binding to the C library openssl. Unless you do some really wild gymnastics with JNI there is no way how to make this code work directly with Jython. OTOH, you don’t have to, Java has just fine bindings to crypto libraries on its own. Use that.

OTHER TIPS

I'm not completely sure but there is not. M2Crypto requires external installation that might differ from system to system. For example if you want to install it on Mac OS X it's not very easy (but not hard as well), on Linux (Ubuntu) is a bit easier. So you might need to right a script that installs it on you system automatically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top