summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2018-08-04 18:13:05 +0200
committerTobias Nießen <tniessen@tnie.de>2018-08-10 12:41:02 +0200
commit39dd3a443064a6bce0e919aee04903398f16c39a (patch)
tree76edd973c5c983fb3497df687dd176a6fdd475ec /test
parent34f56e2d711aaff10838167aa4ece77d278cfa09 (diff)
downloadandroid-node-v8-39dd3a443064a6bce0e919aee04903398f16c39a.tar.gz
android-node-v8-39dd3a443064a6bce0e919aee04903398f16c39a.tar.bz2
android-node-v8-39dd3a443064a6bce0e919aee04903398f16c39a.zip
crypto: deprecate useless crypto APIs
The APIs were probably exposed by accident. getAuthTag and setAuthTag are not a usual getter/setter pair: Getting the authentication tag only makes sense in the context of encryption, setting it only makes sense in the context of decryption. Currently, both functions throw. Neither has been documented publicly. PR-URL: https://github.com/nodejs/node/pull/22126 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-crypto-authenticated.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js
index c7e89d6244..5c0fbb6a95 100644
--- a/test/parallel/test-crypto-authenticated.js
+++ b/test/parallel/test-crypto-authenticated.js
@@ -208,27 +208,6 @@ for (const test of TEST_CASES) {
}
{
- // trying to set tag on encryption object:
- const encrypt = crypto.createCipheriv(test.algo,
- Buffer.from(test.key, 'hex'),
- Buffer.from(test.iv, 'hex'),
- options);
- assert.throws(() => { encrypt.setAuthTag(Buffer.from(test.tag, 'hex')); },
- errMessages.state);
- }
-
- {
- if (!isCCM || !common.hasFipsCrypto) {
- // trying to read tag from decryption object:
- const decrypt = crypto.createDecipheriv(test.algo,
- Buffer.from(test.key, 'hex'),
- Buffer.from(test.iv, 'hex'),
- options);
- assert.throws(function() { decrypt.getAuthTag(); }, errMessages.state);
- }
- }
-
- {
// trying to create cipher with incorrect IV length
assert.throws(function() {
crypto.createCipheriv(