-
Notifications
You must be signed in to change notification settings - Fork 121
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
I got an error when using setCredentials #56
Comments
seems related to #55 |
Perfect, it's exactly what I suspect, I change and now it works perfectly. |
But I have another problem you can add to resolve in a row,
(Because now I'm using a test server with no ssl certificate.) I solve this replacing line 537 in Wrapper.py with:
|
hmm, might be an ad-hoc fix for you, but i'm against adding this by default as it disables SSL certificate verification |
I think adding an option will be very useful, an option that is visible only if people need it. Obviously the standard setting will be to check SSL cert. |
Definitely need an option to specify some SSL related parameters. Either a |
first, let me point you to https://www.python.org/dev/peps/pep-0476/ python by default uses and verifies the system provided ssl certs, which is a good thing. if you want to ignore ssl verification for whatever reason you can already achieve this right now (but you should not) by using the 2nd attempt mentioned in https://www.python.org/dev/peps/pep-0476/#opting-out . Another (IMO) much better approach is to actually verify the certificate with the help of the following two environment variables $ python -c 'import ssl ; print ssl.get_default_verify_paths()'
DefaultVerifyPaths(cafile='/usr/local/etc/openssl/cert.pem', capath='/usr/local/etc/openssl/certs', openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/usr/local/etc/openssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/usr/local/etc/openssl/certs')
$ SSL_CERT_DIR='/some/cert/dir' SSL_CERT_FILE='/some/cert/file.pem' python -c 'import ssl ; print ssl.get_default_verify_paths()'
DefaultVerifyPaths(cafile='/some/cert/file.pem', capath='/some/cert/dir', openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/usr/local/etc/openssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/usr/local/etc/openssl/certs') that said, i'm not against the possibility of customizing request parameters in any way. I'm just strongly against offering a default "ignore ssl" flag, which might give a false impression that it's somehow ok or a common case to ignore ssl errors. So if someone wants to go ahead and allow passing along more options to |
ValueError: Invalid header value 'Basic pokwepdokwo\n'
pokwepdokwo is the actual encoding of user:password that I see also in the Authorization field in the Request header for example in Chrome, so there is a wrongfully added \n at the end, is this an error or it's me do something wrong?
The text was updated successfully, but these errors were encountered: