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

Remove crypto.Credentials API #21153

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!-- YAML
added: v0.1.92
deprecated: v0.11.13
-->

> 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])
<!-- YAML
added: v0.1.94
Expand Down Expand Up @@ -2667,7 +2648,6 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
[`sign.update()`]: #crypto_sign_update_data_inputencoding
[`stream.transform` options]: stream.html#stream_new_stream_transform_options
[`stream.Writable` options]: stream.html#stream_constructor_new_stream_writable_options
[`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options
[`verify.update()`]: #crypto_verify_update_data_inputencoding
[`verify.verify()`]: #crypto_verify_verify_object_signature_signatureformat
[AEAD algorithms]: https://en.wikipedia.org/wiki/Authenticated_encryption
Expand Down
9 changes: 4 additions & 5 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,17 @@ undefined `digest` will throw a `TypeError`.
<a id="DEP0010"></a>
### DEP0010: crypto.createCredentials

Type: Runtime
Type: End-of-Life

The [`crypto.createCredentials()`][] API is deprecated. Please use
The `crypto.createCredentials()` API was removed. Please use
[`tls.createSecureContext()`][] instead.

<a id="DEP0011"></a>
### DEP0011: crypto.Credentials

Type: Runtime
Type: End-of-Life

The `crypto.Credentials` class is deprecated. Please use [`tls.SecureContext`][]
The `crypto.Credentials` class was removed. Please use [`tls.SecureContext`][]
instead.

<a id="DEP0012"></a>
Expand Down Expand Up @@ -1026,7 +1026,6 @@ deprecated and support will be removed in the future.
[`console.log()`]: console.html#console_console_log_data_args
[`crypto.createCipher()`]: crypto.html#crypto_crypto_createcipher_algorithm_password_options
[`crypto.createCipheriv()`]: crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
[`crypto.createCredentials()`]: crypto.html#crypto_crypto_createcredentials_details
[`crypto.createDecipher()`]: crypto.html#crypto_crypto_createdecipher_algorithm_password_options
[`crypto.createDecipheriv()`]: crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv_options
[`crypto.DEFAULT_ENCODING`]: crypto.html#crypto_crypto_default_encoding
Expand Down
18 changes: 0 additions & 18 deletions lib/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,23 +222,5 @@ Object.defineProperties(exports, {
configurable: false,
enumerable: true,
value: constants
},

// Legacy API
createCredentials: {
configurable: true,
enumerable: true,
get: deprecate(() => {
return require('tls').createSecureContext;
}, 'crypto.createCredentials is deprecated. ' +
'Use tls.createSecureContext instead.', 'DEP0010')
},
Credentials: {
configurable: true,
enumerable: true,
get: deprecate(function() {
return require('tls').SecureContext;
}, 'crypto.Credentials is deprecated. ' +
'Use tls.SecureContext instead.', 'DEP0011')
}
});
1 change: 0 additions & 1 deletion test/parallel/test-crypto-classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const TEST_CASES = {
'DiffieHellman': [1024],
'DiffieHellmanGroup': ['modp5'],
'ECDH': ['prime256v1'],
'Credentials': []
};

if (!common.hasFipsCrypto) {
Expand Down
22 changes: 0 additions & 22 deletions test/parallel/test-crypto-deprecated.js

This file was deleted.