Repository navigation
Conversation
The committed key was in reality `rsa-sha2-512`, not `rsa-sha2-256`, as the filenames suggested. Also set the type explicitly to `rsa-sha2-512`, to avoid relying on ssh-keygen's default (`rsa-sha2-512`). ```shell $ grep -E -o ' .+ ' id_rsa_sha2_512_signed-cert.pub | base64 -d | strings | grep -i rsa ``` Bug: libssh2#2474 Follow-up to 3a6ab70 libssh2#1314
There was a problem hiding this comment.
🟡 Not ready to approve
The newly added private key fixture still embeds the old key_rsa_sha2_256_signed identifier internally, which undermines the rename’s consistency and should be regenerated to match sha2_512.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR aligns the RSA-SHA2 signed certificate test fixtures with the actual signature type used in the committed keys (rsa-sha2-512), avoiding misleading sha2_256 naming and reducing reliance on ssh-keygen defaults when regenerating fixtures.
Changes:
- Updates the RSA-SHA2 signed-cert auth test to use the
id_rsa_sha2_512_signed*keypair paths. - Renames test target references and packaged test key artifacts from
sha2_256tosha2_512. - Adjusts
keys-generate.shto explicitly requestrsa-sha2-512for the signed cert generation step.
File summaries
| File | Description |
|---|---|
| tests/test_auth_pubkey_ok_rsa_sha2_512_signed.c | Switches the test to use the id_rsa_sha2_512_signed key/cert fixtures. |
| tests/Makefile.inc | Renames the test binary in DOCKER_TESTS and updates EXTRA_DIST key artifact entries to sha2_512. |
| tests/keys/id_rsa_sha2_512_signed.pub | Updates the public key comment to match the sha2_512 naming. |
| tests/keys/id_rsa_sha2_512_signed-cert.pub | Updates the certificate comment to match the sha2_512 naming. |
| tests/keys/id_rsa_sha2_512_signed | Adds the corresponding OpenSSH private key fixture for the sha2_512 variant. |
| tests/keys-generate.sh | Updates key generation commands to generate/sign the sha2_512 fixture explicitly. |
| tests/.gitignore | Renames the ignored test binary from sha2_256 to sha2_512. |
Review details
- Files reviewed: 6/7 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
|
Thought: storing keys in repo looks more and more like a bad idea
Dynamically generating the key is possible though it needs to Another technical issue is that the generator script needs to be |
…ig` to accept it Explicitly use `-t ssh-rsa` (signature algorithm) to generate `id_rsa_signed.pub` to match the purpose of the patch it came with. Also to differenciate this key (and test) from the subsequently merged `id_rsa_sha2_512_signed-cert.pub`, which used the exact same keys (`-t rsa-sha2-512`, the default) before this patch, and made these tests duplicates. Also: - update `sshd_config` to actually allow using an obsolete/insecure certificate signature `ssh-rsa`, by adding it to `CASignatureAlgorithms`. - delete recently added entry from `HostKeyAlgorithms`, it was not necessary. Follow-up to 5b494b0 #2478 Testing obsolete/insecure algs is not time best spent in CI and for maintainers, so maybe in a next step it'd useful to disable the RSA SHA1-based ones by default. Ref: https://superuser.com/questions/1556852/how-to-check-if-your-ssh-keys-are-in-the-ssh-rsa2-format Ref: 7392dc9 #2479 Follow-up to 4b21e49 #710 Closes #2474
The committed key was in reality
rsa-sha2-512, notrsa-sha2-256, asthe filenames suggested.
Also set the type explicitly to
rsa-sha2-512, to avoid relying onssh-keygen's default (
rsa-sha2-512).Bug: #2474
Follow-up to 3a6ab70 #1314