Open hbayindir opened 6 years ago
humm... that's strange indeed.
would you tell me these results?
strings /proc/${PYTHON_PID}/environ
to get environment variables.ssl.get_default_verify_paths()
openssl s_client -showcerts -connect simple-note.appspot.com:443 -servername simple-note.appspot.com </dev/null
Of course.
nvpy
, the other one is from python
command. They are not different though.ssl.get_default_verify_paths()
: DefaultVerifyPaths(cafile=None, capath='/usr/lib/ssl/certs', openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/usr/lib/ssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/usr/lib/ssl/certs')
openssl s_client -showcerts -connect simple-note.appspot.com:443 -servername simple-note.appspot.com </dev/null
nvpy-environment.txt openssl-command-result.txt python-interpreter-environment.txt
I also have taken an environment snapshot from a system with a working nvPY, and I found the problem. My system locale on this system is tr_TR.UTF-8
. Working system is en_US.UTF-8
, and when I export en_US.UTF-8
to nvPY, it works as it should.
This is a notorious problem. In Turkish, we have two different I
s. ı,I,i,İ
. Unlike English and other languages which have the capitalization relation i <-> I
, we have something more different: ı <-> I & i <-> İ
. Probably code is doing a similar conversion somewhere, and things go south.
I think it should be fixed.
Obligatory Coding Horror story → What's wrong with Turkey?
I've probably found an edge case in nvPY's code. I'm currently stuck debugging it, so I need help.
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)>
insimplenote.py
, line 57.urllib2
, everything works great. I even transplanted the authenticate function fromnvpy
to the tool, and it's working correctly. The stranger thing is I have three computers which run the same distribution (Debian testing, all are up to date) with similar package lists and, other systems doesn't exhibit this problem.All help and tips are greately appreciated. I'll fork and create a pull request for the fix, but I was unable to find a solution yet. All help is greatly appreciated!