Node https agent module

Is it possible to use the nodejs https agent module, providing the .cert and .key files in Vercel functions?
I have this code:

const httpsAgent = new Agent({
  cert: process.env.CERTIFICATE,
  key: process.env.KEY,
  rejectUnauthorized: true,
})

const interApi = axios.create({
  baseURL: process.env.BASE_URL,
  httpsAgent,
})

I use the https agent to make requests to this API. Everything works on localhost, but I have this error on Vercel:

Error: error:0480006C:PEM routines::no start line
    at node:internal/tls/secure-context:70:13
    at Array.forEach (<anonymous>)
    at setCerts (node:internal/tls/secure-context:68:3)
    at configSecureContext (node:internal/tls/secure-context:186:5)
    at Object.createSecureContext (node:_tls_common:116:3)
    at Object.connect (node:_tls_wrap:1763:48)
    at Agent.createConnection (node:https:171:22)
    at Agent.createSocket (node:_http_agent:340:26)
    at Agent.addRequest (node:_http_agent:288:10)
    at new ClientRequest (node:_http_client:334:16)
    at p.request (/var/task/.next/server/app/[slug]/page.js:2579:29132)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async h (/var/task/.next/server/app/[slug]/page.js:61:157225)
    at async p (/var/task/.next/server/app/[slug]/page.js:61:157124)
    at async f (/var/task/.next/server/app/[slug]/page.js:61:158205)
    at async u (/var/task/.next/server/app/[slug]/page.js:61:155563)
    at async /var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:418
    at async rR (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:7978)
    at async r7 (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:18:1144)
    at async es (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:16:26324) {
  library: 'PEM routines',
  reason: 'no start line',
  code: 'ERR_OSSL_PEM_NO_START_LINE',
  digest: '1423523602'
}

When searching the Web for PEM routines:get_name:no start line or ERR_OSSL_PEM_NO_START_LINE I’m presented with a choice of possible sources and solutions for the problem.

docusignapi - Error: error:0909006C:PEM routines:get_name:no start line - node - Stack Overflow suggests it could be something with file encodings, or some .npmrc configuration that should be deleted (for no given reason).

node.js - npm ERR! code ERR_OSSL_PEM_NO_START_LINE and routines:get_name:no start line when installing ReactJS - Stack Overflow also goes the rather rough way to delete pieces and reset a Node installation (also without adding reasons why this might help).

auth0/node-jsonwebtoken#642 also has more approaches to why this might fail. A repeating pattern is something around \n line breaks. Another example simply swapped public and private key (: