On Fri, 8 Apr 2022 13:40:37 GMT, Sean Mullan <mul...@openjdk.org> wrote:

> Please review these changes to update the security libraries to use sealed 
> classes. See JEP 409 for more details on sealed classes.
> 
> No CSR is required as all the changes are to internal classes. A few classes 
> that did not have subclasses were simply marked final instead of sealed.

It looks `KrbTgsRep.java`, `Krb5ProxyCredential.java`, `Builder.java`, 
`Vertex.java`, `Validator.java`, and `RSAKeyPairGenerator.java` can all be made 
package private.

src/java.base/share/classes/sun/security/rsa/RSASignature.java line 50:

> 48:  * @author  Andreas Sterbenz
> 49:  */
> 50: public abstract class RSASignature extends SignatureSpi {

We can probably move the `RSASignature.encodeSignature` method to `RSAUtil` and 
this class can be package private.

src/java.base/share/classes/sun/security/util/math/intpoly/IntegerPolynomial.java
 line 64:

> 62:  */
> 63: 
> 64: public abstract class IntegerPolynomial implements IntegerFieldModuloP {

Although we only have several implementations, I think this class is meant to 
be freely extendable for whatever new modulus.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8165

Reply via email to