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