<div dir="ltr">Hi Tobias,<div>I will change the remote certificate key usage value to something not compliant with RFC 4945.</div><div><br><div id="gmail-page"><div class="gmail-aui-page-panel"><div class="gmail-aui-page-panel-inner"><div class="gmail-issue-navigator"><div class="gmail-content"><div class="gmail-issue-view" style="height:874px"><div class="gmail-issue-container" style=""><div class="gmail-issue-edit-form" id="gmail-issue-content"><div class="gmail-issue-body-content"><div class="gmail-aui-group gmail-issue-body"><div class="gmail-aui-item gmail-issue-main-column"><div class="gmail-module gmail-toggle-wrap" id="gmail-activitymodule"><div class="gmail-mod-content"><div class="gmail-issuePanelWrapper"><div class="gmail-issuePanelContainer" id="gmail-issue_actions_container"><div class="gmail-issue-data-block gmail-activity-comment gmail-twixi-block expanded" id="gmail-comment-43270"><div class="gmail-twixi-wrap gmail-verbose gmail-actionContainer"><div class="gmail-action-body gmail-flooded"><p>As per RFC 4945:</p><blockquote><p>5.1.3.2. KeyUsage</p><p> IKE uses an end-entity certificate in the authentication process.<br> The end-entity certificate may be used for multiple applications. As<br> such, the CA can impose some constraints on the manner that a public<br> key ought to be used. The KeyUsage (KU) and ExtendedKeyUsage (EKU)<br> extensions apply in this situation.</p><p> Since we are talking about using the public key to validate a<br> signature, if the KeyUsage extension is present, then at least one of<br> the digitalSignature or the nonRepudiation bits in the KeyUsage<br> extension MUST be set (both can be set as well). It is also fine if<br> other KeyUsage bits are set.</p><p> A summary of the logic flow for peer cert validation follows:</p><p> o If no KU extension, continue.</p><p> o If KU present and doesn't mention digitalSignature or<br> nonRepudiation (both, in addition to other KUs, is also fine),<br> reject cert.</p><p> o If none of the above, continue.</p><p><br></p><p>Regards</p><p>simon</p></blockquote></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 7, 2020 at 1:08 AM Tobias Brunner <<a href="mailto:tobias@strongswan.org">tobias@strongswan.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Simon,<br>
<br>
> I am specifically looking for interfacing my application with charon for<br>
> getting notification of a failure in the case of a remote certificate<br>
> parsing failed for key usage extension.<br>
<br>
How do you expect parsing of that extension to fail?<br>
<br>
Regards,<br>
Tobias<br>
</blockquote></div>