Skip to content

Commit 534562f

Browse files
codebyteredanielleadams
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 f969cc3 commit 534562f

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

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

Lines 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(), {});

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

Lines 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
});

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

Lines 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({

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

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy