generating an embedded server config with a decrypted private key now also works

master
Tim Bazuin 5 years ago
parent aa8812b837
commit 9436218561

@ -73,11 +73,10 @@ $(function () {
var keyContent = text.substring(keyStartOffset, keyEndOffset);
var decryptedKey = 'DECRYPTED_KEY';
var decryptedPrivateKey = forge.pki.decryptRsaPrivateKey(keyContent.trim(), keyPassword);
var decryptedPem = forge.pki.privateKeyToPem(decryptedPrivateKey);
// actual decryption happens here
return text.substring(0, keyStartOffset) + decryptedKey + text.substring(keyEndOffset);
return text.substring(0, keyStartOffset) + decryptedPem + text.substring(keyEndOffset);
}
function saveText(text, fileName) {

Loading…
Cancel
Save