File tree Expand file tree Collapse file tree 4 files changed +2
-42
lines changed Expand file tree Collapse file tree 4 files changed +2
-42
lines changed Original file line number Diff line number Diff line change @@ -106,4 +106,4 @@ export type {
106
106
GetKeyFunction ,
107
107
} from './types.d.ts'
108
108
109
- export { default as cryptoRuntime } from './util/runtime.js '
109
+ export const cryptoRuntime = 'WebCryptoAPI '
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ export default (
148
148
}
149
149
150
150
function supported ( vector : any ) {
151
- if ( vector . webcrypto === false && lib . cryptoRuntime !== 'node:crypto' ) {
151
+ if ( vector . webcrypto === false ) {
152
152
return false
153
153
}
154
154
if ( env . isElectron && vector . electron === false ) {
Original file line number Diff line number Diff line change @@ -101,41 +101,4 @@ export default (
101
101
} )
102
102
}
103
103
}
104
-
105
- // test('alg argument and jwk.alg is ignored for oct JWKs', async (t) => {
106
- // const oct = {
107
- // k: 'FyCq1CKBflh3I5gikEjpYrdOXllzxB_yc02za8ERknI',
108
- // kty: 'oct',
109
- // }
110
- // await lib.importJWK(oct)
111
- // t.ok(1)
112
- // })
113
-
114
- // if (lib.cryptoRuntime === 'node:crypto') {
115
- // test('alg argument is ignored if jwk does not have alg for asymmetric keys', async (t) => {
116
- // const jwk = {
117
- // kty: 'EC',
118
- // crv: 'P-256',
119
- // x: 'jJ6Flys3zK9jUhnOHf6G49Dyp5hah6CNP84-gY-n9eo',
120
- // y: 'nhI6iD5eFXgBTLt_1p3aip-5VbZeMhxeFSpjfEAf7Ww',
121
- // }
122
- // await lib.importJWK(jwk)
123
- // t.ok(1)
124
- // })
125
- // } else {
126
- // test('alg argument must be present if jwk does not have alg for asymmetric keys', async (t) => {
127
- // const jwk = {
128
- // kty: 'EC',
129
- // crv: 'P-256',
130
- // x: 'jJ6Flys3zK9jUhnOHf6G49Dyp5hah6CNP84-gY-n9eo',
131
- // y: 'nhI6iD5eFXgBTLt_1p3aip-5VbZeMhxeFSpjfEAf7Ww',
132
- // }
133
- // await t.rejects(
134
- // lib.importJWK(jwk),
135
- // '"alg" argument is required when "jwk.alg" is not present',
136
- // )
137
- // await lib.importJWK(jwk, 'ES256')
138
- // await lib.importJWK({ ...jwk, alg: 'ES256' })
139
- // })
140
- // }
141
104
}
You can’t perform that action at this time.
0 commit comments