open-quantum-safe / liboqs-python

Python 3 bindings for liboqs
https://openquantumsafe.org/
MIT License
106 stars 36 forks source link

PYPI pip get an SSLError #64

Closed zrlurb closed 1 year ago

zrlurb commented 1 year ago

I try to use the Dockerfile for some python experiments.

the sample minitest.py works as design, but if I need a additional python module like certifi or cryptography or any other, I get the error _ssl.c:1131:

 pip3 install certifi

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNEXPECTED_MESSAGE] unexpected message (_ssl.c:1131)'))': /simple/pip/

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '[SSL: UNEXPECTED_MESSAGE] unexpected message (_ssl.c:1131)'))) - skipping
baentsch commented 1 year ago

Hi Peter, long time no see (or so :).

This is pretty simple: Just de-activate the PQ logic for this "as documented" (at https://github.com/open-quantum-safe/liboqs-python/blob/2703175902e89c345a240288f7ee86020fec1187/docker/Dockerfile#L63-L64): unset LD_LIBRARY_PATH and pip3 install works with classic crypto (and algs) again.

zrlurb commented 1 year ago

Thanks. If I had read the docker comments, it is clear!

The next beer is on me! ;-)