DenoDDeno
Powered by
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,
  }),
};
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
Deno.createHttpClient
, I can do the following, but I can't find anything about a passphrase:

Deno.createHttpClient({
  caCerts: [ca],
  privateKey: key,
  certChain: "...",
})
Deno.createHttpClient({
  caCerts: [ca],
  privateKey: key,
  certChain: "...",
})
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Deno Deploy --cert flag
bera.funBbera.fun / help
4y ago
Get https server's cert common/alt names using Deno?
themountaindudeTthemountaindude / help
17mo ago
Deno + Vite + DenoKV
AndiAAndi / help
2y ago
HTTPS Oak Deno
ivandpfIivandpf / help
3y ago