drop SSL tests: key too short
authorYadd <yadd@debian.org>
Fri, 8 Nov 2024 04:35:57 +0000 (04:35 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Fri, 8 Nov 2024 04:35:57 +0000 (04:35 +0000)
Forwarded: no
Last-Update: 2022-07-09

Gbp-Pq: Name drop-ssl-tests.patch

test/proxy-agent.js

index 0a9212639f8c39a7754b6ed181a22174fd66dd43..e6b3df3b9e59b285baf476fb67a5bc332ddddeb9 100644 (file)
@@ -467,169 +467,6 @@ test('pass ProxyAgent proxy status code error when using fetch - #2161', { skip:
   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()