HTTPS-Server ESP32-S3 #12943
Unanswered
leoneltrich
asked this question in
ESP32
Replies: 1 comment
-
Look at microdot it's a web server with ssl. What is sure is that certificates have to be in DER format not PEM.. in micropython |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I am trying to implement a server serving a simple web page, using an ESP32-S3. It works just fine using HTTP but I can't seem to figure out how to implement HTTPS. I am using the ussl library and the wrap_socket es described in the documentation:
ussl.wrap_socket(sock, server_side=False, keyfile=None, certfile=None, cert_reqs=CERT_NONE, ca_certs=None, do_handshake=True)
https://docs.micropython.org/en/v1.15/library/ussl.html
But for some reason I keep getting the error "TypeError: extra keyword arguments given". I can only get rid of this when I remove the "keyfile" and "certfile" arguments.
Throws error:
ssl_socket = ussl.wrap_socket(client, server_side=True, keyfile="ssl/key.pem", certfile="ssl/cert.pem")
Doesn't throw error:
ssl_socket = ussl.wrap_socket(client, server_side=True)
Obviously without the key and cert files I can't use the wrap_socket for a server side implementation. Does the ESP32-S3 just not support these arguments or is there some other issue? Any help is highly appreciated
Beta Was this translation helpful? Give feedback.
All reactions