Skip to content

Commit 6713334

Browse files
chore(cli): Disables ec-wrapped (#451)
- Disables configuring the encapsulation and rewrap algorithm selection command line option - This feature is still experimental, and currently failing integration tests - Intension: tag this branch as 0.2.x, then add this feature back in 0.3.x
1 parent a7af5ce commit 6713334

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

cli/src/cli.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
tdfSpecVersion,
1717
OpenTDF,
1818
DecoratedStream,
19-
isPublicKeyAlgorithm,
2019
} from '@opentdf/sdk';
2120
import { CLIError, Level, log } from './logger.js';
2221
import { webcrypto } from 'crypto';
@@ -175,12 +174,6 @@ async function parseReadOptions(argv: Partial<mainArgs>): Promise<ReadOptions> {
175174
argv.assertionVerificationKeys
176175
);
177176
}
178-
if (argv.rewrapKeyType?.length) {
179-
if (!isPublicKeyAlgorithm(argv.rewrapKeyType)) {
180-
throw new CLIError('CRITICAL', `Unsupported rewrap key algorithm: [${argv.rewrapKeyType}]`);
181-
}
182-
r.wrappingKeyAlgorithm = argv.rewrapKeyType;
183-
}
184177
if (argv.concurrencyLimit) {
185178
r.concurrencyLimit = argv.concurrencyLimit;
186179
} else {
@@ -279,12 +272,6 @@ async function parseCreateZTDFOptions(argv: Partial<mainArgs>): Promise<CreateZT
279272
if (argv.assertions?.length) {
280273
c.assertionConfigs = await parseAssertionConfig(argv.assertions);
281274
}
282-
if (argv.encapKeyType?.length) {
283-
if (!isPublicKeyAlgorithm(argv.encapKeyType)) {
284-
throw new CLIError('CRITICAL', `Unsupported rewrap key algorithm: [${argv.encapKeyType}]`);
285-
}
286-
c.wrappingKeyAlgorithm = argv.encapKeyType;
287-
}
288275
if (argv.mimeType?.length) {
289276
if (argv.mimeType && /^[a-z]+\/[a-z0-9-+.]+$/.test(argv.mimeType)) {
290277
c.mimeType = argv.mimeType as `${string}/${string}`;
@@ -467,13 +454,6 @@ export const handleArgs = (args: string[]) => {
467454
description: 'Container format',
468455
default: 'nano',
469456
},
470-
encapKeyType: {
471-
alias: 'encapsulation-algorithm',
472-
group: 'Encrypt Options:',
473-
desc: 'Key type for wrapping keys',
474-
type: 'string',
475-
default: 'rsa:2048',
476-
},
477457
policyBinding: {
478458
group: 'Encrypt Options:',
479459
choices: bindingTypes,
@@ -486,13 +466,6 @@ export const handleArgs = (args: string[]) => {
486466
type: 'string',
487467
default: '',
488468
},
489-
rewrapKeyType: {
490-
alias: 'rewrap-encapsulation-algorithm',
491-
group: 'Decrypt Options:',
492-
desc: 'Key type for rewrap',
493-
type: 'string',
494-
default: 'rsa:2048',
495-
},
496469
userId: {
497470
group: 'Encrypt Options:',
498471
type: 'string',

0 commit comments

Comments
 (0)