diff --git a/src/lhisp-oauth-client.ts b/src/lhisp-oauth-client.ts index a8920e1..f18231b 100644 --- a/src/lhisp-oauth-client.ts +++ b/src/lhisp-oauth-client.ts @@ -36,7 +36,7 @@ export class LhispOauthClient { constructor(params: LhispOauthClientConstructorParams) { if (params.certificado) { this.agent = new https.Agent({ - pfx: params.certificado, + pfx: Buffer.isBuffer(params.certificado) ? params.certificado : Buffer.from(params.certificado, "base64"), passphrase: params.senhaCertificado, rejectUnauthorized: false, });