Merge pull request #8695 from jwinzig-at-hilscher/mbedtls-2.28

Backport 2.28: Fix bug in mbedtls_x509_set_extension