use of de.carne.certmgr.certs.security.PlatformKeyStore in project certmgr by hdecarne.
the class UserCertStoreTest method testPlatformKeyStoreSourceStore.
/**
* Test store creation from platform key stores.
*/
@Test
public void testPlatformKeyStoreSourceStore() {
try {
DefaultSet<PlatformKeyStore> platformKeyStores = PlatformKeyStore.getDefaultSet();
for (PlatformKeyStore platformKeyStore : platformKeyStores) {
UserCertStore importStore = UserCertStore.createFromPlatformKeyStore(platformKeyStore, NoPassword.getInstance());
traverseStore(importStore.getEntries());
}
} catch (IOException e) {
e.printStackTrace();
Assert.fail(e.getMessage());
}
}
use of de.carne.certmgr.certs.security.PlatformKeyStore in project certmgr by hdecarne.
the class PlatformKeyStoreTest method testGetDefaultSet.
/**
* Test the key store provisioning.
*/
@Test
public void testGetDefaultSet() {
Set<PlatformKeyStore> platformKeyStores = PlatformKeyStore.getDefaultSet();
System.out.println("Platform key stores:");
for (PlatformKeyStore platformKeyStore : platformKeyStores) {
System.out.println(platformKeyStore);
}
}
use of de.carne.certmgr.certs.security.PlatformKeyStore in project certmgr by hdecarne.
the class CertImportController method validateAndReloadPlatformSource.
private void validateAndReloadPlatformSource() {
try {
PlatformKeyStore platformSource = validatePlatformSourceInput();
getExecutorService().submit(new ReloadTask<PlatformKeyStore>(platformSource) {
@Override
protected UserCertStore createStore(PlatformKeyStore params) throws IOException {
return UserCertStore.createFromPlatformKeyStore(params, PasswordDialog.enterPassword(CertImportController.this));
}
});
} catch (ValidationException e) {
ValidationAlerts.error(e).showAndWait();
}
}
Aggregations