generating an embedded server config with a decrypted private key now also works
This commit is contained in:
parent
aa8812b837
commit
9436218561
1 changed files with 3 additions and 4 deletions
|
@ -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…
Reference in a new issue