From 8b16dfd07afcc57afa7e5217ab1d1a44e885b2fd Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Tue, 2 Jun 2015 01:10:27 +0900 Subject: [PATCH] tls: add assert msg options.checkServerIdentity --- lib/_tls_wrap.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index c04121ea476a82..b5f3bf6f64c40a 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -888,7 +888,8 @@ exports.connect = function(/* [port, host], options, cb */) { if (!options.keepAlive) options.singleUse = true; - assert(typeof options.checkServerIdentity === 'function'); + assert(typeof options.checkServerIdentity === 'function', + 'options.checkServerIdentity is not a function'); assert(typeof options.minDHSize === 'number', 'options.minDHSize is not a number: ' + options.minDHSize); assert(options.minDHSize > 0,