Skip to content

Commit d711b00

Browse files
Merge branch 'assertion-verification-cli' of https://github.com/opentdf/web-sdk into assertion-verification-cli
2 parents 24c6ce0 + a0a609a commit d711b00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cli/src/cli.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,18 @@ async function parseAssertionConfig(s: string): Promise<assertions.AssertionConf
155155
if (typeof key !== 'string') {
156156
throw new CLIError('CRITICAL', 'HS256 key must be a string');
157157
}
158-
a[i].signingKey.key = new TextEncoder().encode(key); // Update array element directly
158+
a[i].signingKey.key = new TextEncoder().encode(key); // Update array element directly
159159
} else if (alg === 'RS256') {
160160
// Convert PEM string to a KeyLike object
161161
if (typeof key !== 'string') {
162162
throw new CLIError('CRITICAL', 'RS256 key must be a PEM string');
163163
}
164164
try {
165-
a[i].signingKey.key = await importPKCS8(key, 'RS256'); // Import private key
165+
a[i].signingKey.key = await importPKCS8(key, 'RS256'); // Import private key
166166
} catch (err) {
167167
// If importing as a private key fails, try importing as a public key
168168
try {
169-
a[i].signingKey.key = await importSPKI(key, 'RS256'); // Import public key
169+
a[i].signingKey.key = await importSPKI(key, 'RS256'); // Import public key
170170
} catch (err) {
171171
throw new CLIError('CRITICAL', `Failed to parse RS256 key: ${err.message}`);
172172
}

0 commit comments

Comments
 (0)