Verify an OpenSSL certificate chain before deployment
A certificate deployment can fail even when the leaf certificate looks correct. The key may match, the subject alternative name may be present, and the expiration date may be acceptable, but a client still needs a chain from that leaf to a trust anchor. The intermediate certificate is the piece most often missed when a service package, load balancer, or secret contains only the leaf certificate.
OpenSSL’s verify command gives that problem a small, offline test boundary. This guide builds a disposable three-certificate hierarchy, proves that a leaf without its intermediate fails, and then supplies the intermediate explicitly to prove that the same leaf can be validated from the chosen root. The successful result is a repeatable pre-deployment check: missing chain material returns a nonzero status, while the complete chain reports OK.