-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support both OpenSSL 1.1.0 and 1.0.2 #16130
Changes from all commits
684e25c
e9e70ba
2e11a4b
f7cc8d4
382ffc7
4b51882
4db2314
17d6752
cbf147f
9947d57
95f56be
e2f6b96
52a4334
8b0b970
974dd52
272fcbc
4fc521a
6b49375
b98fb15
f913eae
6e1033b
af94ddd
8c432ee
4bdd2b1
61f5494
b1f5264
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,10 @@ const server = tls.createServer({}) | |
}).on('tlsClientError', common.mustCall(function(e) { | ||
assert.ok(e instanceof Error, | ||
'Instance of Error should be passed to error handler'); | ||
// OpenSSL 1.0.x and 1.1.x use different error codes for junk inputs. | ||
assert.ok( | ||
/SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol/.test(e.message), | ||
/SSL routines:[^:]*:(unknown protocol|wrong version number)/.test( | ||
e.message), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tiny nit: can you indent by four spaces here and below? (Line continuation.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. eslint gets unhappy and seems to really want this indent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2 spaces is the standard line continuation for our JS style guide. This seems fine to me but if you really, really wanted to make it a bit less awkward because of the length then maybe just put the RegExp into a variable... ? |
||
'Expecting SSL unknown protocol'); | ||
|
||
server.close(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed, available as
common.fixtures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm. That doesn't seem to work. I also don't see
common.fixtures
in any other test. There'scommon.fixturesDir
, though that just points to the directory. Is that plusfs.readFileSync
plus path-munging preferred overfixtures.readKey
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine as is. It matches what people were instructed to use in the latest Code & Learn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, you're both right. I thought (don't know why) that common.js re-exported everything from fixtures.js.