@@ -191,22 +191,28 @@ class RemotingTLSTests: ClusteredActorSystemsXCTestCase {
191
191
192
192
let local = self . setUpNode ( " local " ) { settings in
193
193
settings. cluster. node. host = " localhost "
194
- settings. cluster. tls = TLSConfiguration . forServer (
194
+ settings. cluster. tls = TLSConfiguration . makeServerConfiguration (
195
195
certificateChain: [ testCertificateSource1] ,
196
- privateKey: testKeySource1,
197
- certificateVerification: . fullVerification,
198
- trustRoots: . certificates( [ testCertificate2] )
196
+ privateKey: testKeySource1
197
+ // ,
198
+ // certificateVerification: .fullVerification,
199
+ // trustRoots: .certificates([testCertificate2])
199
200
)
201
+ settings. cluster. tls? . certificateVerification = . fullVerification
202
+ settings. cluster. tls? . trustRoots = . certificates( [ testCertificate2] )
200
203
}
201
204
202
205
let remote = setUpNode ( " remote " ) { settings in
203
206
settings. cluster. node. host = " localhost "
204
- settings. cluster. tls = TLSConfiguration . forServer (
207
+ settings. cluster. tls = TLSConfiguration . makeServerConfiguration (
205
208
certificateChain: [ testCertificateSource2] ,
206
- privateKey: testKeySource2,
207
- certificateVerification: . fullVerification,
208
- trustRoots: . certificates( [ testCertificate1] )
209
+ privateKey: testKeySource2
210
+ // ,
211
+ // certificateVerification: .fullVerification,
212
+ // trustRoots: .certificates([testCertificate1])
209
213
)
214
+ settings. cluster. tls? . certificateVerification = . fullVerification
215
+ settings. cluster. tls? . trustRoots = . certificates( [ testCertificate1] )
210
216
}
211
217
212
218
local. cluster. join ( node: remote. cluster. uniqueNode. node)
@@ -221,22 +227,28 @@ class RemotingTLSTests: ClusteredActorSystemsXCTestCase {
221
227
222
228
let local = self . setUpNode ( " local " ) { settings in
223
229
settings. cluster. node. host = " 127.0.0.1 "
224
- settings. cluster. tls = TLSConfiguration . forServer (
230
+ settings. cluster. tls = TLSConfiguration . makeServerConfiguration (
225
231
certificateChain: [ testCertificateSource] ,
226
- privateKey: testKey,
227
- certificateVerification: . fullVerification,
228
- trustRoots: . certificates( [ testCertificate] )
232
+ privateKey: testKey
233
+ // ,
234
+ // certificateVerification: .fullVerification,
235
+ // trustRoots: .certificates([testCertificate])
229
236
)
237
+ settings. cluster. tls? . certificateVerification = . fullVerification
238
+ settings. cluster. tls? . trustRoots = . certificates( [ testCertificate] )
230
239
}
231
240
232
241
let remote = setUpNode ( " remote " ) { settings in
233
242
settings. cluster. node. host = " 127.0.0.1 "
234
- settings. cluster. tls = TLSConfiguration . forServer (
243
+ settings. cluster. tls = TLSConfiguration . makeServerConfiguration (
235
244
certificateChain: [ testCertificateSource] ,
236
- privateKey: testKey,
237
- certificateVerification: . fullVerification,
238
- trustRoots: . certificates( [ testCertificate] )
245
+ privateKey: testKey
246
+ // ,
247
+ // certificateVerification: .fullVerification,
248
+ // trustRoots: .certificates([testCertificate])
239
249
)
250
+ settings. cluster. tls? . certificateVerification = . fullVerification
251
+ settings. cluster. tls? . trustRoots = . certificates( [ testCertificate] )
240
252
}
241
253
242
254
let testKit = ActorTestKit ( local)
@@ -268,22 +280,28 @@ class RemotingTLSTests: ClusteredActorSystemsXCTestCase {
268
280
let testKey : NIOSSLPrivateKeySource = . privateKey( try NIOSSLPrivateKey ( bytes: [ UInt8] ( testKey1. utf8) , format: . pem) )
269
281
let local = self . setUpNode ( " local " ) { settings in
270
282
settings. cluster. node. host = " localhost "
271
- settings. cluster. tls = TLSConfiguration . forServer (
283
+ settings. cluster. tls = TLSConfiguration . makeServerConfiguration (
272
284
certificateChain: [ testCertificateSource] ,
273
- privateKey: testKey,
274
- certificateVerification: . noHostnameVerification,
275
- trustRoots: . certificates( [ testCertificate] )
285
+ privateKey: testKey
286
+ // ,
287
+ // certificateVerification: .fullVerification,
288
+ // trustRoots: .certificates([testCertificate])
276
289
)
290
+ settings. cluster. tls? . certificateVerification = . noHostnameVerification
291
+ settings. cluster. tls? . trustRoots = . certificates( [ testCertificate] )
277
292
}
278
293
279
294
let remote = setUpNode ( " remote " ) { settings in
280
295
settings. cluster. node. host = " localhost "
281
- settings. cluster. tls = TLSConfiguration . forServer (
296
+ settings. cluster. tls = TLSConfiguration . makeServerConfiguration (
282
297
certificateChain: [ testCertificateSource] ,
283
- privateKey: testKey,
284
- certificateVerification: . noHostnameVerification,
285
- trustRoots: . certificates( [ testCertificate] )
298
+ privateKey: testKey
299
+ // ,
300
+ // certificateVerification: .fullVerification,
301
+ // trustRoots: .certificates([testCertificate])
286
302
)
303
+ settings. cluster. tls? . certificateVerification = . noHostnameVerification
304
+ settings. cluster. tls? . trustRoots = . certificates( [ testCertificate] )
287
305
}
288
306
289
307
local. cluster. join ( node: remote. cluster. uniqueNode. node)
@@ -303,24 +321,30 @@ class RemotingTLSTests: ClusteredActorSystemsXCTestCase {
303
321
let testCertificateSource : NIOSSLCertificateSource = . certificate( testCertificate)
304
322
let testKey : NIOSSLPrivateKeySource = . file( tmpKeyFile. path)
305
323
let local = self . setUpNode ( " local " ) { settings in
306
- settings. cluster. tls = TLSConfiguration . forServer (
324
+ settings. cluster. tls = TLSConfiguration . makeServerConfiguration (
307
325
certificateChain: [ testCertificateSource] ,
308
- privateKey: testKey,
309
- certificateVerification: . noHostnameVerification,
310
- trustRoots: . certificates( [ testCertificate] )
326
+ privateKey: testKey
327
+ // ,
328
+ // certificateVerification: .fullVerification,
329
+ // trustRoots: .certificates([testCertificate])
311
330
)
331
+ settings. cluster. tls? . certificateVerification = . noHostnameVerification
332
+ settings. cluster. tls? . trustRoots = . certificates( [ testCertificate] )
312
333
settings. cluster. tlsPassphraseCallback = { setter in
313
334
setter ( [ UInt8] ( " test " . utf8) )
314
335
}
315
336
}
316
337
317
338
let remote = setUpNode ( " remote " ) { settings in
318
- settings. cluster. tls = TLSConfiguration . forServer (
339
+ settings. cluster. tls = TLSConfiguration . makeServerConfiguration (
319
340
certificateChain: [ testCertificateSource] ,
320
- privateKey: testKey,
321
- certificateVerification: . noHostnameVerification,
322
- trustRoots: . certificates( [ testCertificate] )
341
+ privateKey: testKey
342
+ // ,
343
+ // certificateVerification: .fullVerification,
344
+ // trustRoots: .certificates([testCertificate])
323
345
)
346
+ settings. cluster. tls? . certificateVerification = . noHostnameVerification
347
+ settings. cluster. tls? . trustRoots = . certificates( [ testCertificate] )
324
348
settings. cluster. tlsPassphraseCallback = { setter in
325
349
setter ( [ UInt8] ( " test " . utf8) )
326
350
}
0 commit comments