+12
-12
lines changedFilter options
+12
-12
lines changed Original file line number Diff line number Diff line change
@@ -74,14 +74,14 @@ const decipher = crypto.createDecipheriv('aes-128-cbc', badkey, iv);
74
74
75
75
cipher.pipe(decipher)
76
76
.on('error', common.expectsError(hasOpenSSL3 ? {
77
-
message: /bad decrypt/,
77
+
message: /bad[\s_]decrypt/,
78
78
library: 'Provider routines',
79
-
reason: 'bad decrypt',
79
+
reason: /bad[\s_]decrypt/i,
80
80
} : {
81
-
message: /bad decrypt/,
81
+
message: /bad[\s_]decrypt/i,
82
82
function: 'EVP_DecryptFinal_ex',
83
83
library: 'digital envelope routines',
84
-
reason: 'bad decrypt',
84
+
reason: /bad[\s_]decrypt/i,
85
85
}));
86
86
87
87
cipher.end('Papaya!'); // Should not cause an unhandled exception.
Original file line number Diff line number Diff line change
@@ -218,9 +218,9 @@ assert.throws(() => {
218
218
} : {
219
219
name: 'Error',
220
220
message: /routines:RSA_sign:digest too big for rsa key$/,
221
-
library: 'rsa routines',
221
+
library: /rsa routines/i,
222
222
function: 'RSA_sign',
223
-
reason: 'digest too big for rsa key',
223
+
reason: /digest[\s_]too[\s_]big[\s_]for[\s_]rsa[\s_]key/i,
224
224
code: 'ERR_OSSL_RSA_DIGEST_TOO_BIG_FOR_RSA_KEY'
225
225
});
226
226
return true;
Original file line number Diff line number Diff line change
@@ -35,16 +35,16 @@ let iter = 0;
35
35
36
36
const errorHandler = common.mustCall((err) => {
37
37
let expectedErrorCode = 'ERR_SSL_WRONG_VERSION_NUMBER';
38
-
let expectedErrorReason = 'wrong version number';
38
+
let expectedErrorReason = /wrong[\s_]version[\s_]number/i;
39
39
if (hasOpenSSL(3, 2)) {
40
40
expectedErrorCode = 'ERR_SSL_PACKET_LENGTH_TOO_LONG';
41
-
expectedErrorReason = 'packet length too long';
41
+
expectedErrorReason = /packet[\s_]length[\s_]too[\s_]long/i;
42
42
};
43
43
44
44
assert.strictEqual(err.code, expectedErrorCode);
45
45
assert.strictEqual(err.library, 'SSL routines');
46
46
if (!hasOpenSSL3) assert.strictEqual(err.function, 'ssl3_get_record');
47
-
assert.strictEqual(err.reason, expectedErrorReason);
47
+
assert.match(err.reason, expectedErrorReason);
48
48
errorReceived = true;
49
49
if (canCloseServer())
50
50
server.close();
@@ -98,15 +98,15 @@ function sendBADTLSRecord() {
98
98
}));
99
99
client.on('error', common.mustCall((err) => {
100
100
let expectedErrorCode = 'ERR_SSL_TLSV1_ALERT_PROTOCOL_VERSION';
101
-
let expectedErrorReason = 'tlsv1 alert protocol version';
101
+
let expectedErrorReason = /tlsv1[\s_]alert[\s_]protocol[\s_]version/i;
102
102
if (hasOpenSSL(3, 2)) {
103
103
expectedErrorCode = 'ERR_SSL_TLSV1_ALERT_RECORD_OVERFLOW';
104
-
expectedErrorReason = 'tlsv1 alert record overflow';
104
+
expectedErrorReason = /tlsv1[\s_]alert[\s_]record[\s_]overflow/i;
105
105
}
106
106
assert.strictEqual(err.code, expectedErrorCode);
107
107
assert.strictEqual(err.library, 'SSL routines');
108
108
if (!hasOpenSSL3)
109
109
assert.strictEqual(err.function, 'ssl3_read_bytes');
110
-
assert.strictEqual(err.reason, expectedErrorReason);
110
+
assert.match(err.reason, expectedErrorReason);
111
111
}));
112
112
}
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4