RFR: 8284105: Update security libraries to use sealed classes [v2]

Sean Mullan mullan at openjdk.java.net
Fri Apr 8 20:07:33 UTC 2022


On Fri, 8 Apr 2022 16:11:27 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Sean Mullan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make some classes package-private instead of sealed.
>
> 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.

Ok. I'll also move `RSASignature.decodeSignature` to `RSAUtil` to maintain symmetry even though it isn't called outside the package.

> 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.

We can always add new ones to the permits clause later.

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

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



More information about the security-dev mailing list