From f758e897c199ac370a66f7e844f729415ec42bd6 Mon Sep 17 00:00:00 2001 From: Antoine du HAMEL Date: Mon, 25 Jun 2018 23:31:43 +0200 Subject: [PATCH] crypto: remove deprecated legacy API The `crypto.Credentials` legacy API has been Runtime deprecated since v0.11.13 and users had been adviced to use `tls.SecureContext` instead. Fixes: https://github.com/nodejs/node/issues/20793 --- doc/api/crypto.md | 20 -------------------- doc/api/deprecations.md | 9 ++++----- lib/crypto.js | 18 ------------------ test/parallel/test-crypto-classes.js | 1 - test/parallel/test-crypto-deprecated.js | 22 ---------------------- 5 files changed, 4 insertions(+), 66 deletions(-) delete mode 100644 test/parallel/test-crypto-deprecated.js diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 5176e7c2649972..89440b4b8748c1 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1416,25 +1416,6 @@ something has to be unpredictable and unique, but does not have to be secret; it is important to remember that an attacker must not be able to predict ahead of time what a given IV will be. -### crypto.createCredentials(details) - - -> Stability: 0 - Deprecated: Use [`tls.createSecureContext()`][] instead. - -- `details` {Object} Identical to [`tls.createSecureContext()`][]. -- Returns: {tls.SecureContext} - -The `crypto.createCredentials()` method is a deprecated function for creating -and returning a `tls.SecureContext`. It should not be used. Replace it with -[`tls.createSecureContext()`][] which has the exact same arguments and return -value. - -Returns a `tls.SecureContext`, as-if [`tls.createSecureContext()`][] had been -called. - ### crypto.createDecipher(algorithm, password[, options])