Pi Pico W SSL/TLS limitations

Two of the MicroPython examples on pimoroni-pico/micropython/examples/inky_frame at main · pimoroni/pimoroni-pico · GitHub refer to TLS 1.3:

  • Random Joke: “JokeAPI.dev needs TLS1.3 which Pico W does not support!”
  • XKCD Daily: “The webcomic is rendered “offline” by our feed2image service since xkcd.com requires TLS1.3!”

The Qualys SSL Labs produces nice reports on TLS and for v2.jokeapi.dev it lists protocol support as

Protocol Support
TLS 1.3 Yes
TLS 1.2 Yes
TLS 1.1 No
TLS 1.0 No
SSL 3 No
SSL 2 No

That doesn’t quite match the explanation on Pimoroni’s example page. What’s the exact nature of the incompatibility here? Where is the TLS code and is the issue the same with C++ applications?

How do these issues show up in MicroPython? I’m getting this from MicroPython on an Inky Frame at the moment…

Traceback (most recent call last):
  File "<stdin>", line 60, in <module>
  File "urllib/urequest.py", line 30, in urlopen
OSError: 16

I think my OSError: 16 is due to a 422 error from the service I’m connecting but I’m still interested in the TLS story.

I think the TLS version is down to the underlying Micropython stuff; it’s nothing hardware-related so C++ apps would be free to implement it.