<div dir="ltr"><p class="MsoNormal">Hi Victor and Michael,<span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">Thanks for your respective response.<span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">I need to make sure the following validation happens.<span></span></p>

<ul style="margin-top:0in" type="disc">
 <li class="gmail-MsoListParagraph" style="margin-left:0in">subject
     field in one certificate matches with the issuer field in the subsequent
     certificate<span></span></li>
 <li class="gmail-MsoListParagraph" style="margin-left:0in">no
     duplicate certificate in the chain<span></span></li>
 <li class="gmail-MsoListParagraph" style="margin-left:0in">basicConstraints
     : for CA certificate CA must be set to TRUE<span></span></li>
</ul>

<p class="gmail-MsoListParagraph">                                 pathLenConstraints – checking as per RFC5280; I
want to check even to see no CA with pathLen set 0 is Issuer of another CA
certificate<span></span></p>

<ul style="margin-top:0in" type="disc">
 <li class="gmail-MsoListParagraph" style="margin-left:0in">validity
     period check<span></span></li>
 <li class="gmail-MsoListParagraph" style="margin-left:0in">revocation
     status check<span></span></li>
 <li class="gmail-MsoListParagraph" style="margin-left:0in">keyUsage
     : Eg. to make sure <b><i>keyCertSign </i></b>indicator set for
     the CA certificates in the chain<span></span></li>
 <li class="gmail-MsoListParagraph" style="margin-left:0in">Criticality
     check<span></span></li>
 <li class="gmail-MsoListParagraph" style="margin-left:0in">Signature
     validation<span></span></li>
</ul>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">As per RFC5280, subjectKeyIdentifier and authorityKeyIdentifier
matching is not required to be done by application.<span></span></p>

<h5>Section
<a name="section-4.2.1.2"></a><a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2"><span style="font-family:"courier new";color:black">4.2.1.2</span></a><span style="font-family:"courier new";color:black">.<span></span></span></h5>

<p class="MsoNormal"><span style="font-size:10pt;font-family:"courier new";color:black">“Applications are not required to verify that key identifiers
match when performing<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:"courier new";color:black">certification path validation.”<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:"courier new";color:black"><span> </span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:"courier new";color:black"><span> </span></span></p>

<p class="MsoNormal">Is it possible to let me know what all from the BULLETED are
validated at OpenSSL level? We are using 1.0.2k<span></span></p>

<p class="MsoNormal">This helps in saving my time required for debugging.<span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">Thanks,<span></span></p>

<p class="MsoNormal">John <span></span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 3, 2017 at 9:57 PM, Michael Wojcik <span dir="ltr"><<a href="mailto:Michael.Wojcik@microfocus.com" target="_blank">Michael.Wojcik@microfocus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> From: openssl-users [mailto:<a href="mailto:openssl-users-bounces@openssl.org">openssl-users-bounces@<wbr>openssl.org</a>] On Behalf<br>
> Of Viktor Dukhovni<br>
> Sent: Wednesday, May 03, 2017 06:40<br>
<span class="">><br>
> For the full verification process see:<br>
><br>
><br>
> <a href="https://github.com/openssl/openssl/blob/f0ef20bf386b5c37ba5a4ce5c1de9a" rel="noreferrer" target="_blank">https://github.com/openssl/<wbr>openssl/blob/<wbr>f0ef20bf386b5c37ba5a4ce5c1de9a</a><br>
> 819bbeffb2/crypto/x509/x509_<wbr>vfy.c#L208<br>
<br>
</span>I haven't looked at x509_vfy.c in 1.1.0, but in the 1.0.x code it's fairly involved. When I implemented custom chain validation for a product, I stepped through the code under the debugger for a handful of different cases, to get a better idea of what it was doing. I recommend the exercise for anyone who wants to intervene in OpenSSL's chain validation.<br>
<br>
My custom validation code uses the OpenSSL validation callback, making some additional checks and allowing some exceptions, based on application configuration. I assume John is doing something similar, and not trying to implement chain validation from scratch. I definitely wouldn't recommend that, given the Byzantine complexity of X.509v3 PKI, unless you really must (e.g. because you want a non-hierarchical PKI topology).<br>
<span class="HOEnZb"><font color="#888888"><br>
Michael Wojcik<br>
Distinguished Engineer, Micro Focus<br>
</font></span><div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>