diff options
Diffstat (limited to 'lib/_tls_common.js')
-rw-r--r-- | lib/_tls_common.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/_tls_common.js b/lib/_tls_common.js index f63acad8ad..b669badb70 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -58,11 +58,14 @@ function SecureContext(secureProtocol, secureOptions, context) { } function validateKeyCert(value, type) { - if (typeof value !== 'string' && !isArrayBufferView(value)) + if (typeof value !== 'string' && !isArrayBufferView(value)) { throw new ERR_INVALID_ARG_TYPE( + // TODO(BridgeAR): Change this to `options.${type}` type, - ['string', 'Buffer', 'TypedArray', 'DataView'] + ['string', 'Buffer', 'TypedArray', 'DataView'], + value ); + } } exports.SecureContext = SecureContext; |