Webrev updated at https://cr.openjdk.java.net/~weijun/8213009/webrev.00/
The subtask id is now used. The previous refactoring has removed the "RSA" algorithm info from some keys. This update adds them back. Thanks Max > On Oct 25, 2018, at 4:38 PM, Weijun Wang <weijun.w...@oracle.com> wrote: > > Please review the change at > > https://cr.openjdk.java.net/~weijun/8026953/webrev.00/ > > (I will use a sub-task id for this change but currently JBS is down). > > The major change is renaming classes. Since we are going to support > algorithms other than RSA, I've renamed the classes like RSAPrivateKey -> > CPrivateKey. Classes that have the same name as JCA classes (like Key, > KeyStore) are also renamed (to CKey, CKeyStore) so it's easy to tell them > apart. > > Others are not about renaming but they are also related to supporting other > algorithms, and there is no behavior change. They include: > > - CKey (plus its child classes CPublicKey and CPrivateKey) has a new field > "algorithm". This field is used by > CKeyStore::generateRSAKeyAndCertificateChain and its value is obtained from > the public key algorithm in a cert [1]. > > - Child class named "RSA" of CKeyPairGenerator. > > - Child class named "RSA" of CSignature. I also moved some RSA-related > methods into this child class as overridden methods. > > - CKeyStore::setPrivateKey's key parameter has a new type Key, but it still > only accepts RSAPrivateCrtKey now. > > Noreg-cleanup. > > Thanks > Max > > [1] > https://docs.microsoft.com/en-gb/windows/desktop/api/wincrypt/ns-wincrypt-_crypt_algorithm_identifier