Eric Poulsen
d5191edf7f
extmod/modussl_mbedtls.c: Add ussl.getpeercert() method.
...
Behaviour is as per CPython but only the binary form is implemented here.
A test is included.
2017-08-16 15:01:00 +10:00
Eric Poulsen
6b4d4a25ce
extmod/modussl_mbedtls: Implement non-blocking SSL sockets.
2017-07-26 11:34:33 +10:00
Damien George
0893b273b9
extmod/modussl_mbedtls: Make socket.close() free all TLS resources.
...
Also, use mp_stream_close() helper to close the underlying socket.
2017-07-25 14:00:45 +10:00
Damien George
a10467b58a
extmod/modussl_mbedtls: When reading and peer wants to close, return 0.
...
If this particular code is returned then there's no more data, it's not
really an error.
2017-07-25 11:53:26 +10:00
Damien George
aa7be82a4d
all: Don't include system errno.h when it's not needed.
2017-07-24 18:43:14 +10:00
Damien George
513dfcf4fe
extmod/modussl_mbedtls: Support server_side mode.
...
To use server_side mode one must pass valid values in the "key" and "cert"
parameters.
2017-07-24 15:08:59 +10:00
Damien George
204ded848e
extmod: Update for changes to mp_obj_str_get_data.
2017-03-29 12:56:45 +11:00
Paul Sokolovsky
59a1201da9
all: Remove readall() method, which is equivalent to read() w/o args.
...
Its addition was due to an early exploration on how to add CPython-like
stream interface. It's clear that it's not needed and just takes up
bytes in all ports.
2016-11-14 00:24:22 +03:00
Paul Sokolovsky
06234a6115
extmod/modussl_mbedtls: Add dummy setblocking() method.
...
Accepts only value of True.
2016-10-15 23:46:13 +03:00
Damien George
75af908c0e
extmod: Use mp_raise_OSError helper function.
2016-10-07 13:52:14 +11:00
Paul Sokolovsky
46ab042230
extmod/modussl_mbedtls: Add server_hostname param for wrap_socket().
...
In CPython, module-level .wrap_socket() function actually doesn't accept
(or document) this param, only SSLContext.wrap_socket() has.
2016-09-23 01:44:23 +03:00
Paul Sokolovsky
080e4d44f3
extmod/modussl_mbedtls: Use 2-component include paths.
...
This is required to use mbedTLS versions from various sources, e.g.
mainline vs embedded into Zephyr RTOS.
2016-09-22 01:30:48 +03:00
Paul Sokolovsky
5f0ecb72c2
extmod/modussl_mbedtls: Implement key= and cert= args to wrap_socket().
...
Unlike standard keyfile= and certfile=, these accept byte buffer objects
(to not depend on FS implementation).
2016-09-22 00:17:44 +03:00
Paul Sokolovsky
9ea2882317
extmod/modussl_mbedtls: Initial implementation of mbedTLS ussl module.
2016-09-21 21:25:33 +03:00