aboutsummaryrefslogtreecommitdiff
path: root/src/js/node/tls.js
diff options
context:
space:
mode:
authorGravatar Ciro Spaciari <ciro.spaciari@gmail.com> 2023-07-28 19:43:15 -0300
committerGravatar GitHub <noreply@github.com> 2023-07-28 15:43:15 -0700
commite7c80b90b81847be158a6e87d0200a8df4121a37 (patch)
treee784c2311f88206ce9832447a113d81aea87afbf /src/js/node/tls.js
parente110ccf84d8d9034e82a79bf7abf1fa92b2370be (diff)
downloadbun-e7c80b90b81847be158a6e87d0200a8df4121a37.tar.gz
bun-e7c80b90b81847be158a6e87d0200a8df4121a37.tar.zst
bun-e7c80b90b81847be158a6e87d0200a8df4121a37.zip
fix(tls) exposes native canonicalizeIP and fix rootCertificates (#3866)
* exposes native canonicalizeIP * remove unintended duplicate * add tests * add tests for debug builds * add rootCertificates test and fix len * just randomize test ids on prisma * remove work around and bump usockets with the actual fix * fix case * bump uws
Diffstat (limited to 'src/js/node/tls.js')
-rw-r--r--src/js/node/tls.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/js/node/tls.js b/src/js/node/tls.js
index aa3601311..567baddc1 100644
--- a/src/js/node/tls.js
+++ b/src/js/node/tls.js
@@ -5,6 +5,9 @@ const InternalTCPSocket = net[Symbol.for("::bunternal::")];
const bunSocketInternal = Symbol.for("::bunnetsocketinternal::");
const { RegExp, Array, String } = $lazy("primordials");
+
+const { rootCertificates, canonicalizeIP } = $lazy("internal/tls");
+
const SymbolReplace = Symbol.replace;
const RegExpPrototypeSymbolReplace = RegExp.prototype[SymbolReplace];
const RegExpPrototypeExec = RegExp.prototype.exec;
@@ -146,11 +149,6 @@ function splitEscapedAltNames(altNames) {
return result;
}
-// TODO:
-function canonicalizeIP(ip) {
- return ip;
-}
-
function checkServerIdentity(hostname, cert) {
const subject = cert.subject;
const altNames = cert.subjectaltname;
@@ -683,7 +681,7 @@ function convertALPNProtocols(protocols, out) {
out.ALPNProtocols = protocols;
}
}
-var rootCertificates = $lazy("rootCertificates");
+
var exports = {
[Symbol.for("CommonJS")]: 0,
CLIENT_RENEG_LIMIT,