Okay, I have performed an experiment.
I have Sonoff-Tasmota 6.5.0.14 compiling under PlatformIO under Linux, and it worked: I have my Shelly connecting to the MQTTS server, posting to topics and seeing messages that it is subscribed to.
I edited xdrv_02_mqtt.ino and made a few changes:
* added #include "BearSSLHelpers.h"
* replaced all "WiFiClientSecure EspClient" with "BearSSL::WifiClientSecure EspClient" (i.e. made the class explicit)
* in function MqttCheckTls, removed the calls to "EspClient.verify" that were AFTER the EspClient.connect() line, and replaced them with a call to EspClient.SetFingerprint(fingerprint1); BEFORE the call to EspClientconnect().
* instead of the verify code, just set result=true;
And it worked. my Shelly is talking to the MQTT server.
This hack works because the previous code (2018 and earlier) assumed the server was good and you have to verify manually; while BearSSL assumes the server is bad and you must provide validation BEFORE you connect.
This is a terrible, terrible hack, because it only offers fingerprint1. And because it almost certainly doesn't handle a server that doesn't match the certificate! (so when my 14yo neighbour starts spoofing my SSID for the lolz, my hack will probably not fail as intended)
In theory BearSSL offers many more options, better than just SHA1 Fingerprints; like importing an X.509 chain of trust, but that will require more code to implement.
So yeah, I made a hack and did a thing.