[PATCH v6 19/28] lib/crypto: Adapt x509_cert_parser to MbedTLS