I try with the crypto nodejs module. But I don't succeed to make it works.
import * as crypto from 'crypto';
import { RsaPrivateKey } from 'crypto';
const privateKey = crypto.privateDecrypt(rsaPrivateKey, Buffer.from('')).toString();
I got a passphrase. I need to do this so I can import my certificate inside AWS. Someone have an idea?
I know that we can do it in golang with
if x509.IsEncryptedPEMBlock(block) {
der, wrongPass := x509.DecryptPEMBlock(block, []byte(o.passphrase))
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,XXXXXXXXX