Skip to content

Commit

Permalink
little tls
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Dec 3, 2024
1 parent c9b376e commit 7791efe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test-nginx.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const TLS = require('node:tls');
const tls = require('node:tls');
const { Readable } = require('stream');
const { assert } = require('chai');

Expand Down Expand Up @@ -128,7 +128,7 @@ describe('nginx config', () => {
});

it('should serve long-lived certificate to HTTPS requests with incorrect host header', () => new Promise((resolve, reject) => {
const socket = TLS.connect(9001, { host:'localhost', servername:'bad.example.com', rejectUnauthorized:false }, () => {
const socket = tls.connect(9001, { host:'localhost', servername:'bad.example.com', rejectUnauthorized:false }, () => {
try {
const certificate = socket.getPeerCertificate();
const validUntilRaw = certificate.valid_to;
Expand Down

0 comments on commit 7791efe

Please sign in to comment.