[PATCH v5 18/27] lib/crypto: Adapt x509_cert_parser to MbedTLS