I think a more accurate test is:
openssl verify \
-untrusted /etc/ssl/example.com/chain.pem /etc/ssl/example.com/cert.pem
The documentation for untrusted
is:
-untrusted file
A file of additional untrusted certificates (intermediate issuer CAs) used to construct a certificate chain from the subject
certificate to a trust-anchor. The file should contain one or more certificates in PEM format. This option can be specified more
than once to include untrusted certificates from multiple files.
Depending on your system, you might also need:
-CAfile /etc/ssl/certs/ca-certificates.crt