crypto: move DEP0113 to End-of-Life
PR-URL: https://github.com/nodejs/node/pull/26249 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
f11e8b959d
commit
b8018f407b
@ -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/26249
|
||||
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.
|
||||
`Cipher.setAuthTag()` and `Decipher.getAuthTag()` are no longer available. They
|
||||
were never documented and would throw when called.
|
||||
|
||||
<a id="DEP0114"></a>
|
||||
### DEP0114: crypto._toBuf()
|
||||
|
@ -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;
|
||||
@ -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',
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user