fix(ext/crypto): use EcKeyImportParams dictionary (#13894)

This commit is contained in:
Filip Skokan 2022-03-11 15:05:40 +01:00 committed by GitHub
parent 47f22777be
commit 6ecadf6398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 16 deletions

View file

@ -153,18 +153,6 @@
webidl.converters.EcKeyGenParams = webidl webidl.converters.EcKeyGenParams = webidl
.createDictionaryConverter("EcKeyGenParams", dictEcKeyGenParams); .createDictionaryConverter("EcKeyGenParams", dictEcKeyGenParams);
const dictEcImportParams = [
...new SafeArrayIterator(dictAlgorithm),
{
key: "namedCurve",
converter: webidl.converters.NamedCurve,
required: true,
},
];
webidl.converters.EcImportParams = webidl
.createDictionaryConverter("EcImportParams", dictEcImportParams);
const dictAesKeyGenParams = [ const dictAesKeyGenParams = [
...new SafeArrayIterator(dictAlgorithm), ...new SafeArrayIterator(dictAlgorithm),
{ {

View file

@ -82,7 +82,7 @@ interface EcKeyGenParams extends Algorithm {
namedCurve: NamedCurve; namedCurve: NamedCurve;
} }
interface EcImportParams extends Algorithm { interface EcKeyImportParams extends Algorithm {
namedCurve: NamedCurve; namedCurve: NamedCurve;
} }
@ -210,7 +210,7 @@ interface SubtleCrypto {
| AlgorithmIdentifier | AlgorithmIdentifier
| HmacImportParams | HmacImportParams
| RsaHashedImportParams | RsaHashedImportParams
| EcImportParams, | EcKeyImportParams,
extractable: boolean, extractable: boolean,
keyUsages: KeyUsage[], keyUsages: KeyUsage[],
): Promise<CryptoKey>; ): Promise<CryptoKey>;
@ -221,7 +221,7 @@ interface SubtleCrypto {
| AlgorithmIdentifier | AlgorithmIdentifier
| HmacImportParams | HmacImportParams
| RsaHashedImportParams | RsaHashedImportParams
| EcImportParams, | EcKeyImportParams,
extractable: boolean, extractable: boolean,
keyUsages: KeyUsage[], keyUsages: KeyUsage[],
): Promise<CryptoKey>; ): Promise<CryptoKey>;
@ -309,7 +309,7 @@ interface SubtleCrypto {
| AlgorithmIdentifier | AlgorithmIdentifier
| HmacImportParams | HmacImportParams
| RsaHashedImportParams | RsaHashedImportParams
| EcImportParams, | EcKeyImportParams,
extractable: boolean, extractable: boolean,
keyUsages: KeyUsage[], keyUsages: KeyUsage[],
): Promise<CryptoKey>; ): Promise<CryptoKey>;