Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto.js')
-rw-r--r--lib/crypto.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index 6306eee05fc..bfe7837cb4e 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -19,6 +19,7 @@ const Buffer = require('buffer').Buffer;
const constants = require('constants');
const stream = require('stream');
const util = require('util');
+const internalUtil = require('internal/util');
const DH_GENERATOR = 2;
@@ -682,10 +683,13 @@ function filterDuplicates(names) {
}
// Legacy API
-exports.__defineGetter__('createCredentials', util.deprecate(function() {
- return require('tls').createSecureContext;
-}, 'createCredentials() is deprecated, use tls.createSecureContext instead'));
+exports.__defineGetter__('createCredentials',
+ internalUtil.deprecate(function() {
+ return require('tls').createSecureContext;
+ }, 'crypto.createCredentials is deprecated. ' +
+ 'Use tls.createSecureContext instead.'));
-exports.__defineGetter__('Credentials', util.deprecate(function() {
+exports.__defineGetter__('Credentials', internalUtil.deprecate(function() {
return require('tls').SecureContext;
-}, 'Credentials is deprecated, use tls.createSecureContext instead'));
+}, 'crypto.Credentials is deprecated. ' +
+ 'Use tls.createSecureContext instead.'));