<div dir="ltr"><span style="font-size:12.8px">>> Actually, that's not the reason.  The positional [certificates]</span><br style="font-size:12.8px"><div><span style="font-size:12.8px">>> arguments to verify(1) are not "chains".  Only the first (leaf)</span></div><div><span style="font-size:12.8px">>> certificate of each of the argument files is processed.</span><br style="font-size:12.8px"></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Ok, that makes sense. Thanks for the update. I was trying this experiment to understand a client authentication failure in a similar scenario. I can now look at the code to figure out what is going on.</span></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Sudarshan</div></div></div></div>
<br><div class="gmail_quote">On Sun, Aug 13, 2017 at 9:49 AM, Viktor Dukhovni <span dir="ltr"><<a href="mailto:openssl-users@dukhovni.org" target="_blank">openssl-users@dukhovni.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Aug 13, 2017, at 11:39 AM, Sudarshan Raghavan <<a href="mailto:sudarshan.t.raghavan@gmail.com">sudarshan.t.raghavan@gmail.<wbr>com</a>> wrote:<br>
><br>
> 3. openssl verify -CAfile <root ca> <chain containing leaf, intermediate ca 2, intermediate ca 1 and root ca in that order>. This fails with this error<br>
><br>
> "error 20 at 0 depth lookup: unable to get local issuer certificate<br>
> error leafchain.pem: verification failed"<br>
><br>
> I understand the reason for this is, the issuer of leaf certificate (intermediate ca 2) is not part of the trusted chain.<br>
<br>
</span>Actually, that's not the reason.  The positional [certificates]<br>
arguments to verify(1) are not "chains".  Only the first (leaf)<br>
certificate of each of the argument files is processed.<br>
<br>
To import additional chain elements use the [-untrusted file]<br>
argument to provide additional untrusted certificates with<br>
which to build the chain.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
        Viktor.<br>
<br>
--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/<wbr>mailman/listinfo/openssl-users</a><br>
</font></span></blockquote></div><br></div>