RFR: 8154015 Apply algorithm constraints to timestamped code
Anthony Scarpino
anthony.scarpino at oracle.com
Fri Jul 1 20:32:47 UTC 2016
On 07/01/2016 12:39 PM, Sean Mullan wrote:
> Looks good, just one comment below ...
>
> On 06/30/2016 05:31 PM, Anthony Scarpino wrote:
>> Unless otherwise specified below, it was accepted..
>>
>> http://cr.openjdk.java.net/~ascarpino/8154015/webrev.02/
>>
>> Tony
>
>>>
>>> PKIX.java:
>>>
>>> 107 this.params = ((PKIXTimestampParameters)
>>> params).getPKIXBuilderParameters();
>>>
>>> Shouldn't this be:
>>>
>>> this.params = (PKIXBuilderParameters) params;
>>
>> The passed in params doesn't itself contain the original
>> PKIXBuilderParamters data. It's the wrapper with an internal
>> PKIXBuilderParameter object it holds the data.
>> getPKIXBuilderParameters() passes the orignal PKIXBuilderParameters
>> object.
>>
>> Without it being setup this way I don't see how I can get and set the
>> timestamp.
>
> Right, you still need to get the timestamp, but all the other methods in
> params are overidden and just call through to the wrapped object, so it
> seems like you can still do this:
>
> if (params instanceof PKIXTimestampParameters) {
> timestamp = ((PKIXTimestampParameters) params).getTimestamp();
> this.params = (PKIXBuilderParameters) params;
> }
>
> and then you don't need the getPKIXBuilderParameters() method.
>
> --Sean
I see what you're saying now... Additionally, I don't need to typecast
params. I can remove the 'else' and just have 'this.params = params;'
thanks
Tony
More information about the security-dev
mailing list