use of won.protocol.message.processor.impl.SignatureAddingWonMessageProcessor in project webofneeds by researchstudio-sat.
the class VerifyAndSignExamples method init.
@Before
public void init() throws Exception {
// initialize signature adding and signature checking processors:
Security.addProvider(new BouncyCastleProvider());
File keysFile = new File(this.getClass().getResource(TestSigningUtils.KEYS_FILE).getFile());
FileBasedKeyStoreService storeService = new FileBasedKeyStoreService(keysFile, "temp");
storeService.init();
nodeAddingProcessor = new SignatureAddingWonMessageProcessor();
CryptographyService cryptographyService = new CryptographyService(storeService, TestSigningUtils.ownerCertUri);
nodeAddingProcessor.setCryptographyService(cryptographyService);
ownerAddingProcessor = new SignatureAddingWonMessageProcessor();
ownerAddingProcessor.setCryptographyService(cryptographyService);
checkingProcessor = new SignatureCheckingWonMessageProcessor();
DefaultWebIdKeyLoader keyLoader = new DefaultWebIdKeyLoader();
keyLoader.setLinkedDataSource(new TestingDataSource());
checkingProcessor.setWebIdKeyLoader(keyLoader);
}
Aggregations