extmod/modussl_mbedtls: Integrate shorter error strings.

The stm32 and esp32 ports now use shorter error strings for mbedtls errors.
Also, MBEDTLS_ERROR_C is enabled on stm32 by default to get these strings.
This commit is contained in:
Thorsten von Eicken
2020-07-02 12:34:36 -07:00
committed by Damien George
parent 3e758ef235
commit 5264478007
6 changed files with 23 additions and 13 deletions

View File

@@ -14,10 +14,10 @@ def test(addr):
print("wrap: no exception")
except OSError as e:
# mbedtls produces "mbedtls -0x7200: SSL - An invalid SSL record was received"
# axtls produces "RECORD_OVERFLOW"
# axtls produces "RECORD_OVERFLOW" but also prints "TLS buffer overflow,..."
# CPython produces "[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1108)"
ok = (
"invalid SSL record" in str(e)
"SSL_INVALID_RECORD" in str(e)
or "RECORD_OVERFLOW" in str(e)
or "wrong version" in str(e)
)