Commit b3a2b85
committed
feat(wasm): implement proper OpenSSH key generation for wasmsign2
Add support for actual OpenSSH Ed25519 key generation using the openssh Bazel
module, replacing the misleading openssh_format flag in wasm_keygen that didn't
actually generate OpenSSH keys.
**Key Changes:**
- Added openssh module dependency (v9.9p1.bcr.1) to MODULE.bazel
- Created new ssh_keygen rule in wasm/ssh_keygen.bzl using real ssh-keygen
- Updated wasm_signing.bzl to properly detect key format from WasmKeyInfo
- Fixed OpenSSH examples in oci_publishing to use actual SSH keys
**Technical Details:**
- ssh_keygen rule uses @openssh//:ssh-keygen binary with Ed25519 keys
- Properly sets key_format="openssh" for correct -Z flag usage
- wasm_keygen continues to work for compact format keys (no -Z flag)
- Both key types now work correctly with wasmsign2 signing
**Fixes:**
- Resolves wasmsign2 I/O errors when using openssh_format=True
- Enables proper OpenSSH signing workflow for WebAssembly components
- Maintains backward compatibility with existing wasmsign2 key workflows
**Testing:**
- //examples/oci_publishing:hello_oci_openssh_signed_image now builds successfully
- //examples/oci_publishing:hello_oci_signed_image still works with compact keys
- Both signing methods produce valid signatures1 parent 1746cdf commit b3a2b85
File tree
5 files changed
+162
-60
lines changed- examples/oci_publishing
- wasm
5 files changed
+162
-60
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
302 | 305 | | |
303 | 306 | | |
304 | 307 | | |
| |||
0 commit comments