I have a gunicorn + uvicorn + fastApi stack. (Basically, I am using https://hub.docker.com/r/tiangolo/uvicorn-gunicorn-fastapi docker image). I’ve already implemented SSL based authentication by providing appropriate gunicorn configuration options: certfile, keyfile, ca_certs, cert_reqs. And it works fine: user have to provide a client SSL certificate in order to be able to make an API calls. What I need to do now
Tag: ssl
How to fix ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)?
I am trying to send an email with python, but it keeps saying ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056). Here is my code: Do you know what is wrong? Answer The port for SSL is 465 and not 587, however when I used SSL the mail arrived to the junk mail. For me the thing that worked was to
Unable to make TLS TCP connection to remote MySQL server with PyMySQL, other tools work
Setting up a new server that I want to communicate to a central MySQL database, using a TLS connection for security Following steps like this I have been able to set up TLS for my MySQL server, I have made several users that are able to login from any host (%), and require SSL connections I can confirm this on
SSL: CERTIFICATE_VERIFY_FAILED certificate verify failed
-> SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) I run this script but I got this error. How can I do it? Answer Since your URL is “an internal corporate URL” (as stated in comments), I’m guessing it uses a self-signed certificate, or is issued by a self-signed CA certificate. If that is in fact the case, you have two
Error after FTPS transfer finishes with Python ftplib
I’m trying to upload file into FTPS server (Wing FTP Server / Cerberus FTP Server 8) with following script. But I keep getting this error. This is FTPS server log. Can anyone tell me what is wrong?!! PS: I don’t know it matters or not but i can easily download from this FTPS server and only cant upload into it.
Python – requests.exceptions.SSLError – dh key too small
I’m scraping some internal pages using Python and requests. I’ve turned off SSL verifications and warnings. On certain servers I receive an SSL error I can’t get past. This happens both in/out of Cygwin, in Windows and OSX. My research hinted at outdated OpenSSL on the server. I’m looking for a fix client side ideally. Edit: I was able to
How to open ssl socket using certificate stored in string variables in python
In Python, ssl.wrap_socket can read certificates from files, ssl.wrap_socket require the certificate as a file path. How can I start an SSL connection using a certificate read from string variables? My host environment does not allow write to files, and tempfile module is not functional I’m using Python 2.7. I store the certificate inside MySQL and read as a string.