Add mTLS ClientCert support

Signed-off-by: Frank Jogeleit <frank.jogeleit@lovoo.com>
This commit is contained in:
Frank Jogeleit
2023-08-10 10:55:12 +02:00
parent eab8015483
commit 25fb88fa43
5 changed files with 46 additions and 245 deletions

View File

@@ -31,8 +31,12 @@ const instanceConfig = {
headers: { ...headers, ...customHeaders }
}
if (!!core.getInput('httpsCA')) {
instanceConfig.httpsAgent = new https.Agent({ ca: core.getInput('httpsCA') })
if (!!core.getInput('httpsCA') || !!core.getInput('httpsCert')) {
instanceConfig.httpsAgent = new https.Agent({
ca: core.getInput('httpsCA') || undefined,
cert: core.getInput('httpsCert') || undefined,
key: core.getInput('httpsKey') || undefined
})
}
if (!!core.getInput('username') || !!core.getInput('password')) {