Javier Candeira
35a1fea90b
all: Raise exceptions via mp_raise_XXX
- Changed: ValueError, TypeError, NotImplementedError
- OSError invocations unchanged, because the corresponding utility
function takes ints, not strings like the long form invocation.
- OverflowError, IndexError and RuntimeError etc. not changed for now
until we decide whether to add new utility functions.
7 years ago
Alexander Steffen
55f33240f3
all: Use the name MicroPython consistently in comments
There were several different spellings of MicroPython present in comments,
when there should be only one.
7 years ago
Damien George
aa7be82a4d
all: Don't include system errno.h when it's not needed.
7 years ago
Paul Sokolovsky
4368ae3142
extmod/modussl_axtls: Allow to close ssl stream multiple times.
Make sure that 2nd close has no effect and operations on closed streams
are handled properly.
7 years ago
Paul Sokolovsky
82b9915b34
extmod/modussl_axtls: Implement server_hostname arg to wrap_socket().
As enabled by SNI support in axTLS v2+.
8 years ago
Paul Sokolovsky
75c3f2a7ab
extmod/modussl_axtls: Update for axTLS 2.1.3.
ssl_client_new() accepts new SSL_EXTENSIONS* argument.
8 years ago
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.
8 years ago
Damien George
75af908c0e
extmod: Use mp_raise_OSError helper function.
8 years ago
Damien George
93c4a6a3f7
all: Remove 'name' member from mp_obj_module_t struct.
One can instead lookup __name__ in the modules dict to get the value.
8 years ago
Paul Sokolovsky
4f1b0292db
py/stream: Add adapter methods with POSIX-compatible signatures.
Previoussly such read() and write() methods were used by modussl_axtls,
move to py/stream for reuse.
8 years ago
Paul Sokolovsky
a53e0e59f3
extmod/modussl_axtls: Use mp_stream_close() method.
8 years ago
Paul Sokolovsky
780114e398
extmod/modussl_axtls: Add dummy setblocking() method.
Accepts only value of True.
8 years ago
Paul Sokolovsky
20283aec10
extmod/modussl_axtls: Further changes to allow alternative SSL modules.
Make variable MICROPY_SSL_AXTLS=1 should be defined to activate modussl_axtls
and link with -laxtls.
8 years ago
Paul Sokolovsky
e32d1e17bb
extmod/modussl: Rename to modussl_axtls.c, to allow impl using other SSL libs.
8 years ago
Paul Sokolovsky
07209f8592
all: Rename mp_obj_type_t::stream_p to protocol.
It's now used for more than just stream protocol (e.g. pin protocol), so
don't use false names.
9 years ago
Paul Sokolovsky
2ea019f3d3
extmod/modussl: Coverage build fixes.
9 years ago
Paul Sokolovsky
9d04fec5d9
extmod/modussl: Make more compatible with non-default obj representations.
Still not compatible with nanboxing.
9 years ago
Paul Sokolovsky
ba61480df5
extmod/modussl: SSL_OK from ssl_read() means "no user data so far".
SSL_OK is numeric 0, and it's *not* an EOF. So, should keep reading.
9 years ago
Paul Sokolovsky
2534bfdb92
extmod/modussl: Support server-side SSL sockets.
wrap_socket(sock, server_side=True)
9 years ago
Paul Sokolovsky
d54290f6e2
extmod/modussl: Throw Python exceptions in case of errors.
9 years ago
Paul Sokolovsky
d19e4f0ba4
extmod/modussl: Remove unused header.
9 years ago
Paul Sokolovsky
aaa8867d4a
modussl: SSL socket wrapper module based on axTLS.
9 years ago