summaryrefslogtreecommitdiffstats
path: root/debian/patches/drop-ssl-tests.patch
blob: e09ac33fa71197453d392231a1dc2fb27c195dc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
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()