use of won.cryptography.service.KeyPairService in project webofneeds by researchstudio-sat.
the class TestSigningUtils method generateTestKeystore.
/**
* Not a test - but sometimes can be useful for generating test keys.
*
* @throws Exception
*/
// @Test
public void generateTestKeystore() throws Exception {
Security.addProvider(new BouncyCastleProvider());
File keysFile = new File("test-keys2.jks");
FileBasedKeyStoreService storeService = new FileBasedKeyStoreService(keysFile, "temp");
storeService.init();
KeyPairService keyPairService = new KeyPairService();
CertificateService certificateService = new CertificateService();
addKeyByUri(atomCertUri, keyPairService, certificateService, storeService);
addKeyByUri(ownerCertUri, keyPairService, certificateService, storeService);
addKeyByUri(nodeCertUri, keyPairService, certificateService, storeService);
}
Aggregations