This is a backport of a non-regression test for issue #810 which affected the current release of mbed TLS, but not the 1.3 branch.