-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
bugSomething isn't workingSomething isn't workingconfirmed bugWe can reproduce this issueWe can reproduce this issuenice-reproAn unusually helpful reproduction is providedAn unusually helpful reproduction is providednode:tls
Description
What version of Bun is running?
1.3.1+89fa0f343
What platform is your computer?
Linux 6.8.0-86-generic x86_64 x86_64
What steps can reproduce the bug?
- create a file
test.mjswith the following content
import tls from 'node:tls';
import fs from 'node:fs';
const certs = [fs.readFileSync('./certificate.pem', 'utf8')];
tls.setDefaultCACertificates(certs);- run it like
bun test.mjs
What is the expected behavior?
No output should be given, but the file ./certificate.pem should be added to the default CA certificates.
What do you see instead?
TypeError: tls.setDefaultCACertificates is not a function. (In 'tls.setDefaultCACertificates(certs)', 'tls.setDefaultCACertificates' is undefined)
at loadAndEvaluateModule (2:1)
Additional information
The easier example for this bug is:
import tls from 'node:tls';
tls.setDefaultCACertificates(tls.getCACertificates('system'));But the method tls.getCACertificates is not implemented, as reported in #24339 .
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconfirmed bugWe can reproduce this issueWe can reproduce this issuenice-reproAn unusually helpful reproduction is providedAn unusually helpful reproduction is providednode:tls