initProps = FileUtils.table(netDefReader);
setConfig(initProps);
// set release locations
int i = 0;
CryptoLib cryptoLib;
try {
cryptoLib = new CryptoLib();
while (true) {
final String location = getConfig("network.unit.update.location" + i, "");
if (location.isEmpty()) {
break;
}
DigestURI locationURL;
try {
// try to parse url
locationURL = new DigestURI(location);
} catch (final MalformedURLException e) {
break;
}
PublicKey publicKey = null;
// get public key if it's in config
try {
final String publicKeyString = getConfig("network.unit.update.location" + i + ".key", null);
if (publicKeyString != null) {
final byte[] publicKeyBytes = Base64Order.standardCoder.decode(publicKeyString.trim());
publicKey = cryptoLib.getPublicKeyFromBytes(publicKeyBytes);
}
} catch (final InvalidKeySpecException e) {
Log.logException(e);
}
final yacyUpdateLocation updateLocation = new yacyUpdateLocation(locationURL, publicKey);