abi
abi15mo ago

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, 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: "...",
})
0 Replies
No replies yetBe the first to reply to this messageJoin