Skip to content
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

createCredentials() is deprecated, use tls.createSecureContext instead #1154

Closed
rogierschouten opened this issue Jul 22, 2015 · 4 comments
Closed
Assignees
Labels

Comments

@rogierschouten
Copy link

It seems that the createCredentials() method is deprecated. I'm not sure if this is the same as #737 as the suggested solution that pops up when you use Node 0.12 is different

@rogierschouten
Copy link
Author

Hint: other libraries use the following code to switch between Node 0.10 and 0.12:

 if (tls.createSecureContext) {
      credentials = tls.createSecureContext(config.options.cryptoCredentialsDetails);
} else {
      credentials = crypto.createCredentials(@config.options.cryptoCredentialsDetails);
}

@dougwilson
Copy link
Member

Hi! What version of this library are you using? With the latest version of this library and Node.js 0.12 I don't get that warning. Can you perhaps make a PR?

@rogierschouten
Copy link
Author

Sorry, I see in the code that your package already has an if-statement prior to the createCredentials() call. Another package generated the warning. I just searched all code for createCredentials().

@dougwilson
Copy link
Member

You can start your node program with trace deprecation in the future, to know where the warning is coming from:

node --trace-deprecation program.js

@dougwilson dougwilson self-assigned this Aug 31, 2015
@mysqljs mysqljs locked and limited conversation to collaborators Aug 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants