Find all certificates that build a chain to a given leaf certificate

Hi @TrinityTonic
I am not sure I follow your use case.

As mentioned in other post, I would suggest you follow what is done in x509_crt_check_parent().
However, this function only finds a candidate for a parent, f course, the parent’s public key(embedded in its certificate) should be used to verify the leaf certificate, so even if the parent has correct Issuer name, the signature algorithm should be correct, and also, verified ( e.g. not expired, revoked, etc…)
Regards,
Mbed TLS Support
Ron