Page 1 of 1

SOCKET Variable

Posted: Wed Nov 16, 2016 11:40 pm
by Knoahlr
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.

Posted: Wed Nov 16, 2016 11:59 pm
by Knoahlr
>>> 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

Re: SOCKET Variable

Posted: Thu Nov 17, 2016 9:31 am
by platforma
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

Re: SOCKET Variable

Posted: Thu Nov 17, 2016 2:15 pm
by Knoahlr
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

Ssl module that validates server certificates

Posted: Thu Nov 17, 2016 4:26 pm
by Knoahlr
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

Re: failing to wrap socket.

Posted: Thu Nov 17, 2016 4:35 pm
by deshipu
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.

Posted: Thu Nov 17, 2016 4:54 pm
by Knoahlr
deshipu wrote:Can you also include the version of MicroPython that you are using and the board on which you are running it?
Done

Sent from my SM-G930W8 using Tapatalk

Re: SOCKET Variable

Posted: Fri Nov 18, 2016 9:46 am
by platforma
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.