Repository navigation
Commit a43a888
authored
js: Wrap Web Crypto and other JS Browser APIs (#1477)
This includes changing functions in `Crypto`, `Compression`, and
elsewhere to be suspend which in turn slightly changes the shape of
other APIs to also be suspend. We implemented just enough to get all
unit tests to pass and doesn't include browser-specific
implementations of `Storage` or `SecureArea`.
As part of this, implement PEM parsing and generation entirely in KMP
and remove internal platform-specific wrappers in `Crypto`. Also add
unit tests for platform-specific implementation of `X509CertChain`
signature checking.
Since we can't easily change multipaz-android-legacy to be suspend,
make copies of old non-suspend APIs from multipaz `Crypto`, `Hkdf`,
and `SessionEncryption` APIs there. Code-duplication is not optimal
but this library is going away fairly soon as the consuming downstream
is in the process of switching away from it to mainline Multipaz
libraries
Test: All tests pass.
Test: Manually tested testapp on both Android and iOS.
Signed-off-by: David Zeuthen <zeuthen@google.com>1 parent f6f7dd7 commit a43a888
151 files changed
Lines changed: 3284 additions & 1134 deletions
File tree
- gradle
- multipaz-android-legacy/src
- androidTest/java/com/android/identity/android
- document
- legacy
- mdoc
- deviceretrieval
- engagement
- main/java/com/android/identity/android
- legacy
- mdoc
- deviceretrieval
- sessionencryption
- transport
- multipaz-compose/src/commonMain/kotlin/org/multipaz/compose/document
- multipaz-csa/src/main/java/org/multipaz/securearea/cloud
- multipaz-dcapi/src
- androidMain/kotlin/org/multipaz/digitalcredentials
- commonTest/kotlin/org/multipaz/presentment/model
- multipaz-doctypes
- src/commonTest/kotlin/org/multipaz/documenttype
- multipaz-openid4vci-server/src/main/java/org/multipaz
- models/verifier
- openid4vci/request
- multipaz-verifier-server/src/main/java/org/multipaz/verifier/request
- multipazctl/src/main/java/org/multipaz/multipazctl
- multipaz
- src
- commonMain/kotlin/org/multipaz
- cbor
- cose
- credential
- crypto
- device
- mdoc
- credential
- issuersigned
- mso
- request
- response
- rical
- sessionencryption
- util
- vical
- openid
- presentment/model
- revocation
- rpc/handler
- sdjwt
- credential
- securearea
- cloud
- software
- trustmanagement
- util
- verification
- commonTest/kotlin/org/multipaz
- cbor
- cose
- crypto
- device
- document
- mdoc
- engagement
- mso
- nfc
- request
- rical
- sessionencryption
- util
- vical
- presentment/model
- revocation
- sdjwt
- trustmanagement
- util
- webtoken
- iosMain/kotlin/org/multipaz
- crypto
- device
- util
- jvmMain/kotlin/org/multipaz/mdoc/transport
- jvmTest/kotlin/org/multipaz
- crypto
- provisioning/openid4vci
- rpc
- webMain
- kotlin/org/multipaz
- crypto
- datetime
- device
- mdoc/transport
- nfc
- securearea/cloud
- tools
- util
- resources
- samples/testapp/src
- androidMain/kotlin/org/multipaz/testapp
- commonMain/kotlin/org/multipaz/testapp
- ui
- iosMain/kotlin/org/multipaz/testapp
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments