| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 68156cb commit c7de027
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,9 +43,12 @@ const dheCipher = 'DHE-RSA-AES128-SHA256'; | |||
| 43 | 43 | const ecdheCipher = 'ECDHE-RSA-AES128-SHA256'; | |
| 44 | 44 | const ciphers = `${dheCipher}:${ecdheCipher}`; | |
| 45 | 45 | ||
| 46 | - // Test will emit a warning because the DH parameter size is < 2048 bits | ||
| 47 | - common.expectWarning('SecurityWarning', | ||
| 48 | - 'DH parameter is less than 2048 bits'); | ||
| 46 | + if (!common.hasOpenSSL(3, 2)) { | ||
| 47 | + // Test will emit a warning because the DH parameter size is < 2048 bits | ||
| 48 | + // when the test is run on versions lower than OpenSSL32 | ||
| 49 | + common.expectWarning('SecurityWarning', | ||
| 50 | + 'DH parameter is less than 2048 bits'); | ||
| 51 | + } | ||
| 49 | 52 | ||
| 50 | 53 | function loadDHParam(n) { | |
| 51 | 54 | const keyname = `dh${n}.pem`; | |
@@ -104,7 +107,11 @@ function testCustomParam(keylen, expectedCipher) { | |||
| 104 | 107 | }, /DH parameter is less than 1024 bits/); | |
| 105 | 108 | ||
| 106 | 109 | // Custom DHE parameters are supported (but discouraged). | |
| 107 | - await testCustomParam(1024, dheCipher); | ||
| 110 | + if (!common.hasOpenSSL(3, 2)) { | ||
| 111 | + await testCustomParam(1024, dheCipher); | ||
| 112 | + } else { | ||
| 113 | + await testCustomParam(3072, dheCipher); | ||
| 114 | + } | ||
| 108 | 115 | await testCustomParam(2048, dheCipher); | |
| 109 | 116 | ||
| 110 | 117 | // Invalid DHE parameters are discarded. ECDHE remains enabled. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments