Skip to content
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

Cryptography woes: Can we freshen up our Python version... #1190

Closed
wexi opened this issue Dec 7, 2017 · 2 comments
Closed

Cryptography woes: Can we freshen up our Python version... #1190

wexi opened this issue Dec 7, 2017 · 2 comments

Comments

@wexi
Copy link
Contributor

wexi commented Dec 7, 2017

Hi fellows,

cryptography is an essential module in my kivy / twisted / pyOpenSSL based app.
Building finally succeeded (it wasn't straightforward) but now we are run time testing.
Thanks to a tip from "tshirtman" I had a meaningful rpdb interactive session as follows:

$ telnet 192.168.1.254 4444
Trying 192.168.1.254...
Connected to 192.168.1.254.
Escape character is '^]'.
> /home/enoch/private/gsld/build/bdist.android-armeabi-v7a/gsld/main.py(38)<module>()
(Pdb) import cryptography
(Pdb) cryptography.__file__
'/data/data/info.gencon.gsld/files/app/lib/python2.7/site-packages/cryptography/__init__.pyo'
(Pdb) os.listdir('/data/data/info.gencon.gsld/files/app/lib/python2.7/site-packages/cryptography')
['utils.pyo', '__init__.pyo', '__about__.pyo', 'fernet.pyo', 'exceptions.pyo', 'x509', 'hazmat']
(Pdb) import cryptography.hazmat
(Pdb) import cryptography.x509
*** ImportError: cannot import name certificate_transparency
(Pdb) os.listdir('/data/data/info.gencon.gsld/files/app/lib/python2.7/site-packages/cryptography/x509')
['general_name.pyo', 'name.pyo', 'oid.pyo', '__init__.pyo', 'extensions.pyo', 'base.pyo', 'certificate_transparency.pyo']

This ImportError indicates that python was not able to get the module code! Not that a file is missing...
Since the same cryptography module (github master) works well in Linux I tend to believe that our stale Python version 2.7.2 is to blame... (Ubuntu is using 2.7.14). Or, do you have another idea?

Thanks, Enoch.

@inclement
Copy link
Member

inclement commented Dec 8, 2017

I don't know what's wrong here, is there a reason you think it must be the python version at fault? What is the full traceback (including details other than the plain ImportError statement)?

To answer the question though, I don't intend to update the python2 version any time soon. It would be quite complicated, and I'd rather work on improving the python3 support. If somebody does it, a PR would potentially be accepted.

@wexi
Copy link
Contributor Author

wexi commented Dec 21, 2017

I have cryptography now working in P4A.
See: pyca/cryptography#4046

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants