diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 20:56:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 20:56:20 +0000 |
commit | 868522aa377a4519adb0b9f402586ab7a41b86ba (patch) | |
tree | 44e805e154a3ace9bd8dbac73843e80d296b7814 /debian/patches/drop-ssl-tests.patch | |
parent | Adding upstream version 5.28.2+dfsg1+~cs23.11.12.3. (diff) | |
download | node-undici-debian.tar.xz node-undici-debian.zip |
Adding debian version 5.28.2+dfsg1+~cs23.11.12.3-6.debian/5.28.2+dfsg1+_cs23.11.12.3-6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/patches/drop-ssl-tests.patch | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/debian/patches/drop-ssl-tests.patch b/debian/patches/drop-ssl-tests.patch new file mode 100644 index 0000000..e09ac33 --- /dev/null +++ b/debian/patches/drop-ssl-tests.patch @@ -0,0 +1,177 @@ +Description: drop SSL tests: key too short +Author: Yadd <yadd@debian.org> +Forwarded: no +Last-Update: 2022-07-09 + +--- a/test/proxy-agent.js ++++ b/test/proxy-agent.js +@@ -467,169 +467,6 @@ + t.end() + }) + +-test('Proxy via HTTP to HTTPS endpoint', async (t) => { +- t.plan(4) +- +- const server = await buildSSLServer() +- const proxy = await buildProxy() +- +- const serverUrl = `https://localhost:${server.address().port}` +- const proxyUrl = `http://localhost:${proxy.address().port}` +- const proxyAgent = new ProxyAgent({ +- uri: proxyUrl, +- requestTls: { +- ca: [ +- readFileSync(join(__dirname, 'fixtures', 'ca.pem'), 'utf8') +- ], +- key: readFileSync(join(__dirname, 'fixtures', 'client-key-2048.pem'), 'utf8'), +- cert: readFileSync(join(__dirname, 'fixtures', 'client-crt-2048.pem'), 'utf8'), +- servername: 'agent1' +- } +- }) +- +- server.on('request', function (req, res) { +- t.ok(req.connection.encrypted) +- res.end(JSON.stringify(req.headers)) +- }) +- +- server.on('secureConnection', () => { +- t.pass('server should be connected secured') +- }) +- +- proxy.on('secureConnection', () => { +- t.fail('proxy over http should not call secureConnection') +- }) +- +- proxy.on('connect', function () { +- t.pass('proxy should be connected') +- }) +- +- proxy.on('request', function () { +- t.fail('proxy should never receive requests') +- }) +- +- const data = await request(serverUrl, { dispatcher: proxyAgent }) +- const json = await data.body.json() +- t.strictSame(json, { +- host: `localhost:${server.address().port}`, +- connection: 'keep-alive' +- }) +- +- server.close() +- proxy.close() +- proxyAgent.close() +-}) +- +-test('Proxy via HTTPS to HTTPS endpoint', async (t) => { +- t.plan(5) +- const server = await buildSSLServer() +- const proxy = await buildSSLProxy() +- +- const serverUrl = `https://localhost:${server.address().port}` +- const proxyUrl = `https://localhost:${proxy.address().port}` +- const proxyAgent = new ProxyAgent({ +- uri: proxyUrl, +- proxyTls: { +- ca: [ +- readFileSync(join(__dirname, 'fixtures', 'ca.pem'), 'utf8') +- ], +- key: readFileSync(join(__dirname, 'fixtures', 'client-key-2048.pem'), 'utf8'), +- cert: readFileSync(join(__dirname, 'fixtures', 'client-crt-2048.pem'), 'utf8'), +- servername: 'agent1', +- rejectUnauthorized: false +- }, +- requestTls: { +- ca: [ +- readFileSync(join(__dirname, 'fixtures', 'ca.pem'), 'utf8') +- ], +- key: readFileSync(join(__dirname, 'fixtures', 'client-key-2048.pem'), 'utf8'), +- cert: readFileSync(join(__dirname, 'fixtures', 'client-crt-2048.pem'), 'utf8'), +- servername: 'agent1' +- } +- }) +- +- server.on('request', function (req, res) { +- t.ok(req.connection.encrypted) +- res.end(JSON.stringify(req.headers)) +- }) +- +- server.on('secureConnection', () => { +- t.pass('server should be connected secured') +- }) +- +- proxy.on('secureConnection', () => { +- t.pass('proxy over http should call secureConnection') +- }) +- +- proxy.on('connect', function () { +- t.pass('proxy should be connected') +- }) +- +- proxy.on('request', function () { +- t.fail('proxy should never receive requests') +- }) +- +- const data = await request(serverUrl, { dispatcher: proxyAgent }) +- const json = await data.body.json() +- t.strictSame(json, { +- host: `localhost:${server.address().port}`, +- connection: 'keep-alive' +- }) +- +- server.close() +- proxy.close() +- proxyAgent.close() +-}) +- +-test('Proxy via HTTPS to HTTP endpoint', async (t) => { +- t.plan(3) +- const server = await buildServer() +- const proxy = await buildSSLProxy() +- +- const serverUrl = `http://localhost:${server.address().port}` +- const proxyUrl = `https://localhost:${proxy.address().port}` +- const proxyAgent = new ProxyAgent({ +- uri: proxyUrl, +- proxyTls: { +- ca: [ +- readFileSync(join(__dirname, 'fixtures', 'ca.pem'), 'utf8') +- ], +- key: readFileSync(join(__dirname, 'fixtures', 'client-key-2048.pem'), 'utf8'), +- cert: readFileSync(join(__dirname, 'fixtures', 'client-crt-2048.pem'), 'utf8'), +- servername: 'agent1', +- rejectUnauthorized: false +- } +- }) +- +- server.on('request', function (req, res) { +- t.ok(!req.connection.encrypted) +- res.end(JSON.stringify(req.headers)) +- }) +- +- server.on('secureConnection', () => { +- t.fail('server is http') +- }) +- +- proxy.on('secureConnection', () => { +- t.pass('proxy over http should call secureConnection') +- }) +- +- proxy.on('request', function () { +- t.fail('proxy should never receive requests') +- }) +- +- const data = await request(serverUrl, { dispatcher: proxyAgent }) +- const json = await data.body.json() +- t.strictSame(json, { +- host: `localhost:${server.address().port}`, +- connection: 'keep-alive' +- }) +- +- server.close() +- proxy.close() +- proxyAgent.close() +-}) +- + test('Proxy via HTTP to HTTP endpoint', async (t) => { + t.plan(3) + const server = await buildServer() |