Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d556ccd

Browse filesBrowse files
codebytereMylesBorins
authored andcommitted
test: make more crypto tests work with BoringSSL
PR-URL: #46429 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b364b9b commit d556ccd
Copy full SHA for d556ccd

File tree

Expand file treeCollapse file tree

4 files changed

+10
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

4 files changed

+10
-10
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-tls-cert-chains-concat.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-cert-chains-concat.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ connect({
2525
assert.strictEqual(peer.subject.emailAddress, 'adam.lippai@tresorit.com');
2626
assert.strictEqual(peer.subject.CN, 'Ádám Lippai');
2727
assert.strictEqual(peer.issuer.CN, 'ca3');
28-
assert.strictEqual(peer.serialNumber, '5B75D77EDC7FB5B7FA9F1424DA4C64FB815DCBDE');
28+
assert.match(peer.serialNumber, /5B75D77EDC7FB5B7FA9F1424DA4C64FB815DCBDE/i);
2929

3030
const next = pair.client.conn.getPeerCertificate(true).issuerCertificate;
3131
const root = next.issuerCertificate;
3232
delete next.issuerCertificate;
3333
debug('next:\n', next);
3434
assert.strictEqual(next.subject.CN, 'ca3');
3535
assert.strictEqual(next.issuer.CN, 'ca1');
36-
assert.strictEqual(next.serialNumber, '147D36C1C2F74206DE9FAB5F2226D78ADB00A425');
36+
assert.match(next.serialNumber, /147D36C1C2F74206DE9FAB5F2226D78ADB00A425/i);
3737

3838
debug('root:\n', root);
3939
assert.strictEqual(root.subject.CN, 'ca1');
4040
assert.strictEqual(root.issuer.CN, 'ca1');
41-
assert.strictEqual(root.serialNumber, '4AB16C8DFD6A7D0D2DFCABDF9C4B0E92C6AD0229');
41+
assert.match(root.serialNumber, /4AB16C8DFD6A7D0D2DFCABDF9C4B0E92C6AD0229/i);
4242

4343
// No client cert, so empty object returned.
4444
assert.deepStrictEqual(pair.server.conn.getPeerCertificate(), {});
Collapse file

‎test/parallel/test-tls-cert-chains-in-ca.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-cert-chains-in-ca.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ connect({
3030

3131
const peer = pair.client.conn.getPeerCertificate();
3232
debug('peer:\n', peer);
33-
assert.strictEqual(peer.serialNumber, '5B75D77EDC7FB5B7FA9F1424DA4C64FB815DCBDE');
33+
assert.match(peer.serialNumber, /5B75D77EDC7FB5B7FA9F1424DA4C64FB815DCBDE/i);
3434

3535
const next = pair.client.conn.getPeerCertificate(true).issuerCertificate;
3636
const root = next.issuerCertificate;
3737
delete next.issuerCertificate;
3838
debug('next:\n', next);
39-
assert.strictEqual(next.serialNumber, '147D36C1C2F74206DE9FAB5F2226D78ADB00A425');
39+
assert.match(next.serialNumber, /147D36C1C2F74206DE9FAB5F2226D78ADB00A425/i);
4040

4141
debug('root:\n', root);
42-
assert.strictEqual(root.serialNumber, '4AB16C8DFD6A7D0D2DFCABDF9C4B0E92C6AD0229');
42+
assert.match(root.serialNumber, /4AB16C8DFD6A7D0D2DFCABDF9C4B0E92C6AD0229/i);
4343

4444
return cleanup();
4545
});
Collapse file

‎test/parallel/test-tls-empty-sni-context.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-empty-sni-context.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const options = {
1616
const server = tls.createServer(options, (c) => {
1717
assert.fail('Should not be called');
1818
}).on('tlsClientError', common.mustCall((err, c) => {
19-
assert.match(err.message, /SSL_use_certificate:passed a null parameter/i);
19+
assert.match(err.message, /passed a null parameter/i);
2020
server.close();
2121
})).listen(0, common.mustCall(() => {
2222
const c = tls.connect({
Collapse file

‎test/parallel/test-tls-set-ciphers-error.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-set-ciphers-error.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ const fixtures = require('../common/fixtures');
1515
ciphers: 'aes256-sha'
1616
};
1717
assert.throws(() => tls.createServer(options, common.mustNotCall()),
18-
/no cipher match/i);
18+
/no[_ ]cipher[_ ]match/i);
1919
options.ciphers = 'FOOBARBAZ';
2020
assert.throws(() => tls.createServer(options, common.mustNotCall()),
21-
/no cipher match/i);
21+
/no[_ ]cipher[_ ]match/i);
2222
options.ciphers = 'TLS_not_a_cipher';
2323
assert.throws(() => tls.createServer(options, common.mustNotCall()),
24-
/no cipher match/i);
24+
/no[_ ]cipher[_ ]match/i);
2525
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.