#21: Add signature validation during installations
This commit is contained in:
@@ -727,8 +727,8 @@ ipcMain.on(Constants.IPC_Install_Upgrade, (event, data) => {
|
|||||||
}, err);
|
}, err);
|
||||||
};
|
};
|
||||||
|
|
||||||
const hasSignature = data.Signature && (data.Signature.length > 0);
|
const hasSignature = !data.SkipVerification && data.Signature && (data.Signature.length > 0);
|
||||||
const hasHash = data.Sha256 && (data.Sha256.length > 0);
|
const hasHash = !data.SkipVerification && data.Sha256 && (data.Sha256.length > 0);
|
||||||
if (hasSignature) {
|
if (hasSignature) {
|
||||||
try {
|
try {
|
||||||
const files = helpers.createSignatureFiles(data.Signature, Constants.DEV_PUBLIC_KEY);
|
const files = helpers.createSignatureFiles(data.Signature, Constants.DEV_PUBLIC_KEY);
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ class App extends IPCContainer {
|
|||||||
this.sendRequest(Constants.IPC_Install_Upgrade, {
|
this.sendRequest(Constants.IPC_Install_Upgrade, {
|
||||||
Sha256: sha256,
|
Sha256: sha256,
|
||||||
Signature: signature,
|
Signature: signature,
|
||||||
|
SkipVerification: false,
|
||||||
Source: data.Destination,
|
Source: data.Destination,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user