[8] Code review request for 8005408: KeyStore API enhancements

Vincent Ryan vincent.x.ryan at oracle.com
Tue Jan 22 14:40:33 PST 2013


On 22/01/2013 17:05, Vincent Ryan wrote:
> I've made those changes. Thanks.
>
>
> On 22 Jan 2013, at 16:24, Sean Mullan wrote:
:
>>
>> KeyStore.java
>>
>> [296] I think you want to say:
>>
>> If none was set then null is returned.
>>
>> As I understand it, if none is set, then the KeyStore provider will use a default algorithm as specified by the Security property. This needs to be made clearer in the javadoc, as it reads it says it returns the value of this property, which is not possible since this class doesn't know what keystore type is being used at this point.
>>
>
> That's right. I want to add that behaviour but I need to think about it further.


I've clarified the spec for the KeyStore.getProtectionAlgorithm method:

/**
  * Gets the name of the protection algorithm.
  * If none was set then the keystore provider will use its default
  * protection algorithm. The name of the default protection algorithm
  * for a given keystore type is set using the
  * {@code 'keystore.<type>.keyProtectionAlgorithm'} Security property.
  * For example, the
  * {@code keystore.PKCS12.keyProtectionAlgorithm} property stores the
  * name of the default key protection algorithm used for PKCS12
  * keystores.
  *
  * @return the algorithm name, or {@code null} if none was set
  *
  * @since 1.8
  */
public String getProtectionAlgorithm() {
     return protectionAlgorithm;
}



>
>
>
>> [304] specify that null can be returned -
>>
>> @return the algorithm name, or null if none was set
>>
>> --Sean



More information about the security-dev mailing list