<div><div dir="auto">Oh, your testing is checking service type Cipher which is Java SE service. It is not the case we discussed in the context: <span style="color:rgb(49,49,49);font-family:-apple-system,"helvetica neue";word-spacing:1px"> non-Java SE service types.</span></div></div><div dir="auto"><span style="color:rgb(49,49,49);font-family:-apple-system,"helvetica neue";word-spacing:1px"><br></span></div><div dir="auto"><span style="color:rgb(49,49,49);font-family:-apple-system,"helvetica neue";word-spacing:1px">Xuelei</span></div><div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 17, 2024 at 2:47 PM Martin Balao <<a href="mailto:mbalao@openjdk.org" target="_blank">mbalao@openjdk.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 17 Dec 2024 22:13:09 GMT, Xue-Lei Andrew Fan <<a href="mailto:xuelei@openjdk.org" target="_blank">xuelei@openjdk.org</a>> wrote:<br>
<br>
> Sorry, I meant BCFIPS provider as linked in the URL I provided. Which may not be able to use putService as it needs to support back to Java 1.5, IIRC. Xuelei<br>
<br>
BCFIPS works too (tested on `bc-fips-2.0.0.jar`). In this case, the filter rule should be `!BCFIPS.Cipher.AES/CBC/PKCS5Padding; *` and the constructor `org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider`. This is the output:<br>
<br>
<br>
Cipher AES/CBC/PKCS5Padding (BC): null<br>
Cipher AES/GCM/NoPadding (BC): Cipher.AES/GCM/NoPadding, mode: not initialized, algorithm from: BCFIPS<br>
<br>
<br>
Please notice that the legacy `Provider::put` API is filtered too.<br>
<br>
-------------<br>
<br>
PR Comment: <a href="https://git.openjdk.org/jdk/pull/15539#issuecomment-2549809277" rel="noreferrer" target="_blank">https://git.openjdk.org/jdk/pull/15539#issuecomment-2549809277</a><br>
</blockquote></div></div>
</div>