title: show entire certificate chain for a local certificate file
body: <p>I have a certificate (for example <a href="https://www.incommon.org/cert/repository/InCommonServerCA.txt">this one</a>) saved in a local file. Using <code>openssl</code> from the command line, <strong>how can I display the entire chain from this certificate to a root CA?</strong> I tried:</p>
  
  <pre><code>openssl verify -verbose -purpose sslserver -CApath /etc/ssl/certs InCommonServerCA.txt
  </code></pre>
  
  <p>and got this confusing output that only seems to show the leaf certificate:</p>
  
  <pre><code>InCommonServerCA.txt: C = US, O = Internet2, OU = InCommon, CN = InCommon Server CA
  error 26 at 0 depth lookup:unsupported certificate purpose
  OK
  </code></pre>
  
  <p>Any ideas?</p>