[PATCH v3 16/25] lib/crypto: Adapt x509_cert_parser to MbedTLS