summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2019-02-04 10:13:18 -0800
committerAnna Henningsen <anna@addaleax.net>2019-02-06 19:36:55 +0100
commit00d49ad673b0c4851298ef00522af60186210cfd (patch)
tree01708de1a327dfc6f760a47ec61762320b852594 /test
parent6da82b1057afb4dbc94e3eada224dfdb97d6a533 (diff)
downloadandroid-node-v8-00d49ad673b0c4851298ef00522af60186210cfd.tar.gz
android-node-v8-00d49ad673b0c4851298ef00522af60186210cfd.tar.bz2
android-node-v8-00d49ad673b0c4851298ef00522af60186210cfd.zip
tls: null not valid as a renegotiate callback
Allow undefined as a callback, but do not allow null. PR-URL: https://github.com/nodejs/node/pull/25929 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-tls-disable-renegotiation.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/parallel/test-tls-disable-renegotiation.js b/test/parallel/test-tls-disable-renegotiation.js
index 42042a21bf..da492713a0 100644
--- a/test/parallel/test-tls-disable-renegotiation.js
+++ b/test/parallel/test-tls-disable-renegotiation.js
@@ -63,6 +63,12 @@ server.listen(0, common.mustCall(() => {
type: TypeError,
});
+ common.expectsError(() => client.renegotiate({}, null), {
+ code: 'ERR_INVALID_CALLBACK',
+ type: TypeError,
+ });
+
+
// Negotiation is still permitted for this first
// attempt. This should succeed.
let ok = client.renegotiate(options, common.mustCall((err) => {