abiA
Denoβ€’3y ago
abi

HTTPS custom cert passphrase in Deno?

I have this code from a Node.js project, and I'm trying to figure out if there's any alternative in Deno today:

const config = {
  method: "post",
  baseURL: BASE_URL,
  url: "/foobar",
  data,
  httpsAgent: new Agent({
    ca: ca,
    key: key,
    passphrase: secret, // does this exist in deno?
    cert: key,
    secureProtocol: "TLSv1_2_method",
    rejectUnauthorized: true,
    requestCert: true,
  }),
};


Using Deno.createHttpClient, I can do the following, but I can't find anything about a passphrase:

Deno.createHttpClient({
  caCerts: [ca],
  privateKey: key,
  certChain: "...",
})
Was this page helpful?