<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<div id="x_compose-container" itemscope="" itemtype="https://schema.org/EmailMessage" style="direction:ltr">
<span itemprop="creator" itemscope="" itemtype="https://schema.org/Organization"><span itemprop="name"></span></span>
<div>
<div style="direction:ltr">I always thought the logic is ‚case insensitive substring of canonical name‘, so it also works with things like ‚DHE‘ in ciphers. In that case ‚SHA‘ would match SHA-1 as well as SHA-xxx.</div>
<div><br>
</div>
<div class="x_acompli_signature">
<div>Gruss</div>
<div>Bernd</div>
<div>-- </div>
<div>http://bernd.eckenfels.net</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> security-dev <security-dev-bounces@openjdk.java.net> on behalf of Sean Mullan <sean.mullan@oracle.com><br>
<b>Sent:</b> Monday, March 12, 2018 3:41:36 PM<br>
<b>To:</b> Weijun Wang; security-dev@openjdk.java.net<br>
<b>Subject:</b> Re: Algorithm aliases of SHA-1 in DisabledAlgorithmConstraints</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 3/12/18 4:39 AM, Weijun Wang wrote:<br>
> I put "SHA-1" in a DisabledAlgorithmConstraints, it rejects SHA1 but allows sha1.<br>
<br>
That sounds like a bug.<br>
<br>
> <br>
> The reason is that <a href="http://hg.openjdk.java.net/jdk/jdk/file/6b54e8cd9b3d/jdk/src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java#l96">
http://hg.openjdk.java.net/jdk/jdk/file/6b54e8cd9b3d/jdk/src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java#l96</a> does not see "sha1".<br>
> <br>
> On the other hand, it rejects both "SHA-1" and "sha-1", because it's a direct case-insenstive match.<br>
> <br>
> Also, it allows both "SHA" and "sha" because there is no special code for it. Isn't "SHA" also an alias of "SHA-1"?<br>
> <br>
> Do you think all these names should be recognized? Shall we clarify it in the spec?<br>
<br>
I would tend to think that we should only specify (or guarantee) that <br>
standard names are checked and used in the disabled algorithm <br>
properties. Aliases have never been a supported/standard feature, so I <br>
think if we start to accommodate them, then we have to document that and <br>
it increases the complexity of the code and chance that we might miss <br>
one. For example, SHA is an alias for SHA-1 in the JDK Sun provider but <br>
there is no corresponding alias for SHAwithRSA in the SunRsaSign <br>
provider, so it is inconsistent already.<br>
<br>
--Sean<br>
</div>
</span></font>
</body>
</html>