}
@Override
public SignerInfo getSignerInfo(byte[] signerId) throws SignatureException {
synchronized(certPathStore) {
SignerInfo signerInfo = certPathStore.getSignerInfo(signerId);
File signerFile = new File(signerIdToFileName(signerId));
if (signerInfo == null) {
if (signerFile.exists()) {
FileInputStream file = null;
try {
file = new FileInputStream(signerFile);
ProtocolSignerInfo data = ProtocolSignerInfo.newBuilder().mergeFrom(file).build();
signerInfo = new SignerInfo(data);
} catch (SignatureException e) {
throw new SignatureException("Failed to parse signer info from file: "
+ signerFile.getAbsolutePath(), e);
} catch (IOException e) {
throw new SignatureException("Failed to parse signer info from file: "