failing to wrap socket.
SOCKET Variable
Was the socket.IPPROTO_SEC variable removed from Micropython 1.8, since most examples online have it. If not, is there any way I could get the variable, without having to rebuild the whole firmware?
failing to wrap socket.
>>> sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> import ussl as ssl
>>> s=ssl.wrap_socket(sock)
ssl_handshake_status: -256
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 5] EIO
Running this on the Esp8266 NodeMCU and Micropython Version 1.8.6
>>> import ussl as ssl
>>> s=ssl.wrap_socket(sock)
ssl_handshake_status: -256
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 5] EIO
Running this on the Esp8266 NodeMCU and Micropython Version 1.8.6
Last edited by Knoahlr on Wed Nov 16, 2016 11:59 pm, edited 1 time in total.
Re: SOCKET Variable
I might be wrong, but IPPROTO_SEC is available for WiPy. Which "most" examples are you referring to and what board are you using?
http://docs.micropython.org/en/latest/w ... pproto_sec
http://docs.micropython.org/en/latest/w ... pproto_sec
Re: SOCKET Variable
You're right, I'm using the esp8266 Node MCU and used examples for the Wipy. I was trying to use ssl to wrap a socket and kept getting an "ssl_handshake_error:-256" I thought this was the error.
Sent from my SM-G930W8 using Tapatalk
Sent from my SM-G930W8 using Tapatalk
Ssl module that validates server certificates
I'm currently unable to post data to secure "company" sites for a project I'm doing and this is because the ssl handshake fails.
I believe the reason to be because the current ussl module doesn't Validate server certificates.
Is there any ssl.wrap.socket () out there that does this?
I`m running the esp8266 NodeMCU with Micropython V1.8.6
">>ssl_handshake_status:-256"
Thank you in advance.
Sent from my SM-G930W8 using Tapatalk
I believe the reason to be because the current ussl module doesn't Validate server certificates.
Is there any ssl.wrap.socket () out there that does this?
I`m running the esp8266 NodeMCU with Micropython V1.8.6
">>ssl_handshake_status:-256"
Thank you in advance.
Sent from my SM-G930W8 using Tapatalk
Re: failing to wrap socket.
Can you also include the version of MicroPython that you are using and the board on which you are running it?
Re: RE: Re: failing to wrap socket.
Donedeshipu wrote:Can you also include the version of MicroPython that you are using and the board on which you are running it?
Sent from my SM-G930W8 using Tapatalk
Re: SOCKET Variable
This is, indeed, an error, I am going to merge your two topics together and move it to the esp8266 category.
Please don't cross-post and don't create multiple topics for the same issue.
Please don't cross-post and don't create multiple topics for the same issue.