Skip to content

Commit 411df57

Browse files
Bashamegasaschanaz
andauthored
Migrate Crypto to KDL (microsoft#2277)
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
1 parent cfac2ee commit 411df57

File tree

5 files changed

+90
-104
lines changed

5 files changed

+90
-104
lines changed

inputfiles/patches/crypto.kdl

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
removals {
2+
dictionary KeySystemTrackConfiguration {
3+
member encryptionScheme // Gecko only as of 2025-05
4+
}
5+
}

inputfiles/patches/webauthn.kdl

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,52 @@
11
removals {
2-
enum AuthenticatorTransport {
3-
smart-card // WebKit only as of 2023-05
4-
}
5-
dictionary AuthenticationExtensionsClientInputs {
6-
// https://searchfox.org/mozilla-central/source/dom/webidl/WebAuthentication.webidl
7-
// https://searchfox.org/wubkat/source/Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientInputs.idl
8-
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/credentialmanagement/authentication_extensions_client_inputs.idl
9-
member appidExclude
10-
member credBlob
11-
member getCredBlob
12-
member hmacGetSecret // No implementation as of 2025-05
13-
member payment
14-
}
15-
dictionary AuthenticationExtensionsClientInputsJSON {
16-
member appidExclude
17-
}
18-
dictionary AuthenticationExtensionsClientOutputs {
19-
// (same as *Inputs)
20-
member appidExclude // No implementation as of 2025-05
21-
member hmacGetSecret // No implementation as of 2025-05
22-
member payment // Blink only as of 2025-06
23-
}
2+
enum AuthenticatorTransport {
3+
smart-card // WebKit only as of 2023-05
4+
}
5+
6+
dictionary AuthenticationExtensionsClientInputs {
7+
// https://searchfox.org/mozilla-central/source/dom/webidl/WebAuthentication.webidl
8+
// https://searchfox.org/wubkat/source/Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientInputs.idl
9+
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/credentialmanagement/authentication_extensions_client_inputs.idl
10+
member appidExclude
11+
member credBlob
12+
member getCredBlob
13+
member hmacGetSecret // No implementation as of 2025-05
14+
member payment
15+
}
16+
17+
dictionary AuthenticationExtensionsClientInputsJSON {
18+
member appidExclude
19+
}
20+
21+
dictionary AuthenticationExtensionsClientOutputs {
22+
// (same as *Inputs)
23+
member appidExclude // No implementation as of 2025-05
24+
member hmacGetSecret // No implementation as of 2025-05
25+
member payment // Blink only as of 2025-06
26+
}
27+
28+
dictionary PublicKeyCredentialCreationOptions {
29+
member attestationFormats // Blink only as of 2024-08
30+
member hints // Blink only as of 2024-08
31+
}
32+
33+
dictionary PublicKeyCredentialCreationOptionsJSON {
34+
member attestationFormats // Gecko only as of 2024-08
35+
}
36+
37+
dictionary PublicKeyCredentialRequestOptions {
38+
member hints // Blink only as of 2024-08
39+
}
40+
41+
dictionary CredentialRequestOptions {
42+
// Only `mediation`, `publicKey`, `signal` are implemented by 2+ engines, everything else is currently Blink only.
43+
// https://searchfox.org/mozilla-central/source/dom/webidl/CredentialManagement.webidl
44+
// https://searchfox.org/wubkat/source/Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.idl
45+
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/credentialmanagement/credential_request_options.idl
46+
member digital // Behind a flag in WebKit and Blink as of 2024-03
47+
member federated
48+
member identity
49+
member otp
50+
member password
51+
}
2452
}

inputfiles/patches/webcrypto.kdl

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// https://github.com/microsoft/TypeScript/issues/46036
2+
dictionary CryptoKeyPair {
3+
member privateKey required=#true
4+
member publicKey required=#true
5+
}
6+
7+
interface CryptoKey {
8+
property algorithm type=KeyAlgorithm
9+
property usages {
10+
type sequence {
11+
type KeyUsage
12+
}
13+
}
14+
}
15+
16+
removals {
17+
enum KeyFormat {
18+
raw-private // No implementation as of 2025-09
19+
raw-public // No implementation as of 2025-09
20+
raw-secret // No implementation as of 2025-09
21+
raw-seed // No implementation as of 2025-09
22+
}
23+
24+
enum KeyUsage {
25+
decapsulateBits // No implementation as of 2025-09
26+
decapsulateKey // No implementation as of 2025-09
27+
encapsulateBits // No implementation as of 2025-09
28+
encapsulateKey // No implementation as of 2025-09
29+
}
30+
31+
dictionary JsonWebKey {
32+
member priv // No implementation as of 2025-09
33+
member pub // No implementation as of 2025-09
34+
}
35+
}

inputfiles/removedTypes.jsonc

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,6 @@
1616
"ConnectionType": {
1717
"value": ["wimax"]
1818
},
19-
"KeyFormat": {
20-
"value": [
21-
"raw-private", // No implementation as of 2025-09
22-
"raw-public", // No implementation as of 2025-09
23-
"raw-secret", // No implementation as of 2025-09
24-
"raw-seed" // No implementation as of 2025-09
25-
]
26-
},
27-
"KeyUsage": {
28-
"value": [
29-
"decapsulateBits", // No implementation as of 2025-09
30-
"decapsulateKey", // No implementation as of 2025-09
31-
"encapsulateBits", // No implementation as of 2025-09
32-
"encapsulateKey" // No implementation as of 2025-09
33-
]
34-
},
3519
"MediaSessionAction": {
3620
"value": [
3721
"enterpictureinpicture", // Blink only as of 2024-07
@@ -234,21 +218,6 @@
234218
}
235219
}
236220
},
237-
"CredentialRequestOptions": {
238-
"members": {
239-
"member": {
240-
// Only `mediation`, `publicKey`, `signal` are implemented by 2+ engines, everything else is currently Blink only.
241-
// https://searchfox.org/mozilla-central/source/dom/webidl/CredentialManagement.webidl
242-
// https://searchfox.org/wubkat/source/Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.idl
243-
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/credentialmanagement/credential_request_options.idl
244-
"digital": null, // Behind a flag in WebKit and Blink as of 2024-03
245-
"federated": null,
246-
"identity": null,
247-
"otp": null,
248-
"password": null
249-
}
250-
}
251-
},
252221
"DisplayMediaStreamOptions": {
253222
"members": {
254223
"member": {
@@ -322,14 +291,6 @@
322291
}
323292
}
324293
},
325-
"JsonWebKey": {
326-
"members": {
327-
"member": {
328-
"priv": null, // No implementation as of 2025-09
329-
"pub": null // No implementation as of 2025-09
330-
}
331-
}
332-
},
333294
"KeyframeAnimationOptions": {
334295
"members": {
335296
"member": {
@@ -338,13 +299,6 @@
338299
}
339300
}
340301
},
341-
"KeySystemTrackConfiguration": {
342-
"members": {
343-
"member": {
344-
"encryptionScheme": null // Gecko only as of 2025-05
345-
}
346-
}
347-
},
348302
"MediaCapabilitiesDecodingInfo": {
349303
"members": {
350304
"member": {
@@ -453,28 +407,6 @@
453407
}
454408
}
455409
},
456-
"PublicKeyCredentialCreationOptions": {
457-
"members": {
458-
"member": {
459-
"attestationFormats": null, // Blink only as of 2024-08
460-
"hints": null // Blink only as of 2024-08
461-
}
462-
}
463-
},
464-
"PublicKeyCredentialCreationOptionsJSON": {
465-
"members": {
466-
"member": {
467-
"attestationFormats": null // Gecko only as of 2024-08
468-
}
469-
}
470-
},
471-
"PublicKeyCredentialRequestOptions": {
472-
"members": {
473-
"member": {
474-
"hints": null // Blink only as of 2024-08
475-
}
476-
}
477-
},
478410
"PushEventInit": {
479411
"members": {
480412
"member": {

0 commit comments

Comments
 (0)