Node.js gerar certificado
const { Certificate } = await import('crypto');
const spkac = getSpkacSomehow();
const Cert = Certificate();
console.log(Cert)
const PublicKey = cert.exportPublicKey(spkac);
console.log(PublicKey);
// Prints: the public key as <Buffer ...>
Undefined