| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2e7ba31 commit 9556d98
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,7 @@ const { spawn } = require('child_process'); | |||
| 14 | 14 | const CIPHERS = 'PSK+HIGH'; | |
| 15 | 15 | const KEY = 'd731ef57be09e5204f0b205b60627028'; | |
| 16 | 16 | const IDENTITY = 'Client_identity'; // Hardcoded by `openssl s_server` | |
| 17 | + const useIPv4 = !common.hasIPv6; | ||
| 17 | 18 | ||
| 18 | 19 | const server = spawn(common.opensslCli, [ | |
| 19 | 20 | 's_server', | |
@@ -23,6 +24,7 @@ const server = spawn(common.opensslCli, [ | |||
| 23 | 24 | '-psk_hint', IDENTITY, | |
| 24 | 25 | '-nocert', | |
| 25 | 26 | '-rev', | |
| 27 | + ...(useIPv4 ? ['-4'] : []), | ||
| 26 | 28 | ], { encoding: 'utf8' }); | |
| 27 | 29 | let serverErr = ''; | |
| 28 | 30 | let serverOut = ''; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,6 +38,8 @@ const fixtures = require('../common/fixtures'); | |||
| 38 | 38 | const tls = require('tls'); | |
| 39 | 39 | const spawn = require('child_process').spawn; | |
| 40 | 40 | ||
| 41 | + const useIPv4 = !common.hasIPv6; | ||
| 42 | + | ||
| 41 | 43 | test1(); | |
| 42 | 44 | ||
| 43 | 45 | // simple/test-tls-securepair-client | |
@@ -64,7 +66,9 @@ function test(keyPath, certPath, check, next) { | |||
| 64 | 66 | const server = spawn(common.opensslCli, ['s_server', | |
| 65 | 67 | '-accept', 0, | |
| 66 | 68 | '-cert', fixtures.path(certPath), | |
| 67 | - '-key', fixtures.path(keyPath)]); | ||
| 69 | + '-key', fixtures.path(keyPath), | ||
| 70 | + ...(useIPv4 ? ['-4'] : []), | ||
| 71 | + ]); | ||
| 68 | 72 | server.stdout.pipe(process.stdout); | |
| 69 | 73 | server.stderr.pipe(process.stdout); | |
| 70 | 74 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments