Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "undici",
"version": "6.29.0",
"version": "6.29.1",
"description": "An HTTP/1.1 client, written from scratch for Node.js",
"homepage": "https://undici.nodejs.org",
"bugs": {
Expand Down
6 changes: 3 additions & 3 deletions test/node-test/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ test('forwards TLS certificate validation callbacks via tls option', async (t) =
t.after(() => agent.close())

await assert.rejects(
request(`https://localhost:${server.address().port}`, { dispatcher: agent }),
request(`https://127.0.0.1:${server.address().port}`, { dispatcher: agent }),
/rejected by custom checkServerIdentity/
)
assert.strictEqual(identityChecks, 1)
Expand Down Expand Up @@ -874,7 +874,7 @@ test('forwards TLS certificate validation callbacks via connect option', async (
t.after(() => agent.close())

await assert.rejects(
request(`https://localhost:${server.address().port}`, { dispatcher: agent }),
request(`https://127.0.0.1:${server.address().port}`, { dispatcher: agent }),
/rejected by custom checkServerIdentity/
)
assert.strictEqual(identityChecks, 1)
Expand Down Expand Up @@ -903,7 +903,7 @@ test('copies connect and tls options before storing them', async (t) => {

connect.timeout = 200
tls.servername = 'agent2'
await request(`http://localhost:${server.address().port}`, { dispatcher: agent })
await request(`http://127.0.0.1:${server.address().port}`, { dispatcher: agent })

assert.notStrictEqual(capturedOptions.connect, connect)
assert.notStrictEqual(capturedOptions.tls, tls)
Expand Down
5 changes: 3 additions & 2 deletions test/tls-renegotiation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { constants } = require('node:crypto')
const { once } = require('node:events')
const { readFileSync } = require('node:fs')
const { join } = require('node:path')
const { createServer } = require('node:tls')
const { createServer, TLSSocket } = require('node:tls')
const { test } = require('node:test')

const { Client } = require('..')
Expand All @@ -20,10 +20,11 @@ const wrongHost = {
cert: readFileSync(join(fixtures, 'wrong-cert.pem'))
}
const ca = readFileSync(join(fixtures, 'ca.pem'))
const skip = typeof TLSSocket.prototype.setKeyCert !== 'function'

// @see https://github.com/nodejs/undici/security/advisories/GHSA-qrxm-fqhp-jwvm
for (const protocol of ['http/1.1', 'h2']) {
test(`TLS certificate errors after ${protocol} connection establishment reject the request`, async (t) => {
test(`TLS certificate errors after ${protocol} connection establishment reject the request`, { skip }, async (t) => {
let startRenegotiation
const renegotiationStarted = new Promise((resolve) => {
startRenegotiation = resolve
Expand Down
Loading