Closed MarkoPomerants closed 3 years ago
DataToSign::finalize(byte[]) should not trigger loading the TSL again when re-using the same Configuration instance which already has the TSL loaded, unless the loaded TSL has expired.
For more information, see TSL loading and pre-loading. In case of using the central configuration object singleton, pre-loading can be done as follows:
ConfigurationSingeltonHolder.getInstance().getTSL().refresh();
What might cause TSL to load every time DataToSign::finalize(byte[]) is called, is if an instance of DataToSign (which has a reference to an instance of Configuration) is serialized, then deserialized and then finalize(byte[]) is called on the deserialized object (which now contains its own separate instance of Configuration).
Thanks.
It turns out it was the serialized DataToSign, which had it's own Configuration instance.
This function loads TSL every time: dataToSign.finalize(signatureValue);
How can I use previously loaded TSL conf with it?