<div dir="ltr">Yep, I read the documentation.  The part "<i>suppresses support for "*" as wildcard pattern in labels</i> " sounds really like that wildcard is not accepted at all.  But I have to admit that I don't know what a "label" is.<div><br></div><div>With this flag, only <i><a href="http://www.feistyduck.com">www.feistyduck.com</a></i> and <i><a href="http://feistyduck.com">feistyduck.com</a></i> are accepted, it seems useless to me to specify <i>*.<a href="http://feistyduck.com">feistyduck.com</a></i> in the SAN.  Why not just use <i><a href="http://www.feistyduck.com">www.feistyduck.com</a>?</i></div><div><br></div><div>If I understand correctly, if i want a more open certificate that accept my subdomain, I should use X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS but then allowing multi-label wildcards can increase the risk of attack I guess.</div><div><br></div><div>Thank you</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 16 févr. 2023, à 13 h 48, Viktor Dukhovni <<a href="mailto:openssl-users@dukhovni.org">openssl-users@dukhovni.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Feb 16, 2023 at 01:21:56PM -0500, Pierre-Luc Boily wrote:<br>
<br>
> In the book of Ivan Ristic (Bullet Proof TLS and PKI), chapter 12,<br>
> section *Creating Certificates for Multiple Hostnames*, the author<br>
> uses a wildcard in the SAN (*.<a href="http://feistyduck.com" rel="noreferrer" target="_blank">feistyduck.com</a>).<br>
> <br>
> So, if the SAN has *.<a href="http://feistyduck.com" rel="noreferrer" target="_blank">feistyduck.com</a> and <a href="http://feistyduck.com" rel="noreferrer" target="_blank">feistyduck.com</a>, what will be<br>
> accepted with the above flag?<br>
> <br>
> 1. <a href="http://www.feistyduck.com" rel="noreferrer" target="_blank">www.feistyduck.com</a> ?<br>
> 4. <a href="http://feistyduck.com" rel="noreferrer" target="_blank">feistyduck.com</a> ?<br>
<br>
Yes, regardless of the flag value.<br>
<br>
> 2. <a href="http://www.sub.feistyduck.com" rel="noreferrer" target="_blank">www.sub.feistyduck.com</a> ?<br>
> 3. <a href="http://www.sub.sub2.feistyduck.com" rel="noreferrer" target="_blank">www.sub.sub2.feistyduck.com</a> ?<br>
<br>
No, regardless of the flag value.<br>
<br>
The documentation reads:<br>
<br>
   If set, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS suppresses support for<br>
   "*" as wildcard pattern in labels that have a prefix or suffix, such<br>
   as: "www*" or "*www"; this only applies to X509_check_host.<br>
<br>
did you read the documentation?  Which part was unclear?<br>
<br>
-- <br>
    Viktor.<br>
</blockquote></div>