Skip to content
Permalink
Browse files

fix(electron): rename dh2048.pem to dhparam.pem

  • Loading branch information...
devinus committed Jan 28, 2019
1 parent a8c1b9d commit e75e42cba1ffe6835ff54b74b1b7ca49ead90b77
@@ -128,7 +128,7 @@ const startDaemon = async () => {
}

const tlsPath = path.join(dataPath, 'tls');
const dhparamPath = path.join(tlsPath, 'dh2048.pem');
const dhparamPath = path.join(tlsPath, 'dhparam.pem');
if (!config.rpc.secure) {
log.info('Generating secure node RPC configuration...');
const clientsPath = path.join(tlsPath, 'clients');
@@ -137,7 +137,7 @@ const startDaemon = async () => {
const serverCertPath = path.join(tlsPath, 'server.cert.pem');
const serverKeyPath = path.join(tlsPath, 'server.key.pem');
const serverPems = generateCert('nanowalletcompany.com');
const dhparam = await fs.readFileAsync(path.join(__dirname, 'tls', 'dh2048.pem'));
const dhparam = await fs.readFileAsync(path.join(__dirname, 'tls', 'dhparam.pem'));
await writeFileAtomic(serverCertPath, normalizeNewline(serverPems.cert), { mode: 0o600 });
await writeFileAtomic(serverKeyPath, normalizeNewline(serverPems.private), { mode: 0o600 });
await writeFileAtomic(dhparamPath, normalizeNewline(dhparam), { mode: 0o600 });
@@ -153,13 +153,17 @@ const run = async () => {
await app.whenReady();

if (!is.development) {
autoUpdater.on('error', (err) => {
log.error('Error updating:', err);
});

autoUpdater.on('checking-for-update', () => {
log.info('Checking for update:', productName, '>', version);
global.isUpdating = false;
});

autoUpdater.on('update-available', () => {
log.info('Update available:', productName, '>', version);
log.info('Update available:', productName, '>', version, '(downloading...)');
});

autoUpdater.on('update-not-available', () => {
@@ -172,8 +176,12 @@ const run = async () => {
});

updateElectronApp({
logger: log,
updateInterval: '30 minutes',
logger: {
log(...args) {
return log.debug('[update-electron-app]', ...args);
},
},
});
}

@@ -191,7 +199,7 @@ const run = async () => {

const storeVersion = store.get('version');
if (!storeVersion || semver.gt(version, storeVersion)) {
const outdatedAssets = ['config.json', 'log', 'tls'];
const outdatedAssets = ['config.json', 'log'];
log.info('Deleting outdated assets:', outdatedAssets.join(', '));
await del(outdatedAssets, { force: true, cwd: dataPath });
}
File renamed without changes.

0 comments on commit e75e42c

Please sign in to comment.
You can’t perform that action at this time.