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

crypto: move DEP0113 to End-of-Life #26249

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
11 changes: 6 additions & 5 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2162,17 +2162,18 @@ accessed outside of Node.js core: `Socket.prototype._handle`,
### DEP0113: Cipher.setAuthTag(), Decipher.getAuthTag()
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/???
tniessen marked this conversation as resolved.
Show resolved Hide resolved
description: End-of-Life.
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22126
description: Runtime deprecation.
-->

Type: Runtime
Type: End-of-Life

With the current crypto API, having `Cipher.setAuthTag()` and
`Decipher.getAuthTag()` is not helpful and both functions will throw an error
when called. They have never been documented and will be removed in a future
release.
The functions `Cipher.setAuthTag()` and `Decipher.getAuthTag()` have been
removed. They had never been documented would throw when called.
tniessen marked this conversation as resolved.
Show resolved Hide resolved

<a id="DEP0114"></a>
### DEP0114: crypto._toBuf()
Expand Down
21 changes: 1 addition & 20 deletions lib/internal/crypto/cipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const {
const assert = require('internal/assert');
const LazyTransform = require('internal/streams/lazy_transform');

const { deprecate, normalizeEncoding } = require('internal/util');
const { normalizeEncoding } = require('internal/util');

// Lazy loaded for startup performance.
let StringDecoder;
Expand Down Expand Up @@ -206,13 +206,6 @@ function setAuthTag(tagbuf) {
return this;
}

Object.defineProperty(Cipher.prototype, 'setAuthTag', {
get: deprecate(() => setAuthTag,
'Cipher.setAuthTag is deprecated and will be removed in a ' +
'future version of Node.js.',
'DEP0113')
});

Cipher.prototype.setAAD = function setAAD(aadbuf, options) {
if (!isArrayBufferView(aadbuf)) {
throw new ERR_INVALID_ARG_TYPE('buffer',
Expand Down Expand Up @@ -243,20 +236,8 @@ function addCipherPrototypeFunctions(constructor) {
constructor.prototype.setAutoPadding = Cipher.prototype.setAutoPadding;
if (constructor === Cipheriv) {
constructor.prototype.getAuthTag = Cipher.prototype.getAuthTag;
Object.defineProperty(constructor.prototype, 'setAuthTag', {
get: deprecate(() => setAuthTag,
'Cipher.setAuthTag is deprecated and will be removed in ' +
'a future version of Node.js.',
'DEP0113')
});
} else {
constructor.prototype.setAuthTag = setAuthTag;
Object.defineProperty(constructor.prototype, 'getAuthTag', {
get: deprecate(() => constructor.prototype.getAuthTag,
'Decipher.getAuthTag is deprecated and will be removed ' +
'in a future version of Node.js.',
'DEP0113')
});
}
constructor.prototype.setAAD = Cipher.prototype.setAAD;
}
Expand Down