feat: parse certificado from base64 string
This commit is contained in:
parent
342688bebc
commit
b9e93c52f6
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ export class LhispOauthClient<iAccessToken extends AccessToken = AccessToken> {
|
||||||
constructor(params: LhispOauthClientConstructorParams) {
|
constructor(params: LhispOauthClientConstructorParams) {
|
||||||
if (params.certificado) {
|
if (params.certificado) {
|
||||||
this.agent = new https.Agent({
|
this.agent = new https.Agent({
|
||||||
pfx: params.certificado,
|
pfx: Buffer.isBuffer(params.certificado) ? params.certificado : Buffer.from(params.certificado, "base64"),
|
||||||
passphrase: params.senhaCertificado,
|
passphrase: params.senhaCertificado,
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue