dpallot / simple-websocket-server

A python based websocket server that is simple and easy to use.
951 stars 321 forks source link

ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca #68

Closed secu77 closed 5 years ago

secu77 commented 6 years ago

Hi, I am trying to run the SimpleHTTPSServer.py, and I have some errors:

First: this packages have been moved to http.server import BaseHTTPServer, SimpleHTTPServer (I've solved this error)

Second: When I try to run SimpleHTTPSServer, I get this error:

ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca

I have generate pem with: openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem

Exactly how do you tell us. And Its in the right path, but when I run:

sudo python3 SimpleHTTPSServer.py --example chat --ssl 1 --cert ./cert.pem

then show me the ssl error ('unknow ca')

I don't know what I am doing bad, thanks for help.