Skip to content

Commit

Permalink
Improve test-tls-key-mismatch.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmercer committed Mar 23, 2017
1 parent 348cc80 commit 502f9f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/parallel/test-tls-key-mismatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ if (!common.hasCrypto) {
const assert = require('assert');
const tls = require('tls');
const fs = require('fs');
const errorMessageRegex = new RegExp('^Error: error:0B080074:x509 ' +
'certificate routines:X509_check_private_key:key values mismatch$');

const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
Expand All @@ -37,4 +39,4 @@ const options = {

assert.throws(function() {
tls.createSecureContext(options);
});
}, errorMessageRegex);

0 comments on commit 502f9f3

Please sign in to comment.