File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -155,18 +155,18 @@ async function parseAssertionConfig(s: string): Promise<assertions.AssertionConf
155
155
if ( typeof key !== 'string' ) {
156
156
throw new CLIError ( 'CRITICAL' , 'HS256 key must be a string' ) ;
157
157
}
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
159
159
} else if ( alg === 'RS256' ) {
160
160
// Convert PEM string to a KeyLike object
161
161
if ( typeof key !== 'string' ) {
162
162
throw new CLIError ( 'CRITICAL' , 'RS256 key must be a PEM string' ) ;
163
163
}
164
164
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
166
166
} catch ( err ) {
167
167
// If importing as a private key fails, try importing as a public key
168
168
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
170
170
} catch ( err ) {
171
171
throw new CLIError ( 'CRITICAL' , `Failed to parse RS256 key: ${ err . message } ` ) ;
172
172
}
You can’t perform that action at this time.
0 commit comments