<div dir="ltr"><div>Hi John, thanks for reaching out!</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>





<div lang="EN-US">
<div>
<p class="MsoNormal">I just happened to notice this on the list this morning.  We have a 20+ year old commercial Java cryptographic toolkit at Entrust that we maintain and implement security protocols and algorithms which makes use of API’s in the javax.security.cert
 package.  It is in used by many customers. </p></div></div></div></blockquote><div><br></div><div>Would you be able to share a bit more about how your product is exposed to these APIs? The APIs were introduced around 2002 for compatibility concerns with unbundled JSSE releases. They deprecated in Java 9, but has had a notice discouraging their use since they were introduced.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div lang="EN-US"><div><p class="MsoNormal">It looks like you are planning to remove that entire package now?</p></div></div></div></blockquote><div><br></div><div>No decision or commitment has been made yet. But yes, there is an ongoing effort to get this removed, we just don't know when yet.</div><div><br></div><div>The topic of removal has been discussed for about five years now. The APIs were marked deprecated for-removal in Java 13. In Java 15, the SSLSession.getPeerCertificateChain interface method was changed to be a default method which throws UnsupportedOperationException. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div lang="EN-US"><div><p class="MsoNormal">We still compile with Java 8 (because we have customers that still need Java 8 support), but we need to support later Java runtime versions. </p></div></div></div></blockquote><div><br></div><div>This will compile fine with the current LTS, which is Java 17. The next LTS will be 21, coming this fall. </div><div><br></div><div>I would recommend that you start looking at any use of javax.security.cert.X509Certificate for parsing certificates. That should be replaced with java.security.cert.CertificateFactory. Then I'd look to see if you have any calls to SSLSession.getPeerCertificateChain. Those should be replaced with SSLSession.getPeerCertificate.</div><div><br></div><div>Once you've done this, you might be left with your own implementations of SSLSession.getPeerCertificateChain. If you have any of those, you'll need to override them to compile on Java 11. From Java 17, there is the mentioned default getPeerCertificate method, so your implementation will not need to override this method.</div><div><br></div><div>If you need to support Java 8 AND Java X (where X has removed the package), then you'll need to look into versioned jars, modularization or other forms of build changes such that you can compile against this wide range of Java versions.  </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div lang="EN-US"><div><p class="MsoNormal"> I
 guess we would have eventually noticed this when we upped our base compiler to 11 which probably won’t happen until 8 no longer has extended support (which is 2030 according to this?) </p></div></div></div></blockquote><div><br></div><div>This would give you the deprecation warning introduced in Java 9, yes.</div><div>  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><p class="MsoNormal"><u></u></p>
<p class="MsoNormal">I guess we will have to make a number of changes to our toolkit because this change will break things in a number of areas in Java 19.<br></p></div></blockquote><div><br></div><div>I believe there were no changes in this area in Java 19. The removal will not happen until 21, 22, 23 or later.</div><div><br></div><div>Thanks again for your feedback, much appreciated!</div><div><br></div><div>Eirik.</div></div></div>