SSL ESP32

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
tcpipchip
Posts: 5
Joined: Wed Aug 07, 2019 7:10 pm

SSL ESP32

Post by tcpipchip » Wed Aug 21, 2019 1:45 pm

import ssl
import socket
s = socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SEC)

>>> import socket
>>> import ssl
>>> s = socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SEC)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'IPPROTO_SEC'
>>>

Can you help me ?

I want a easy method to access aws iot (i have the certicates..in other post i showed the problem with mqtt, now i will try "socket"

not easy!

Works for you ?

User avatar
jimmo
Posts: 553
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: SSL ESP32

Post by jimmo » Thu Aug 22, 2019 12:24 am

Hi,

I think the documentation you're looking at might be out of date (e.g. from v1.9) or possibly specific to the WiPy board. I don't believe this parameter is required anymore.

Have a look at
https://docs.micropython.org/en/latest/ ... rap_socket

And an example using ussl.wrap_socket https://github.com/micropython/micropyt ... request.py

Post Reply