New x/crypto release breaks ssh tests ("crypto/rsa: message too long for RSA public key size")

Open
#316 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
57/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go
Domain
testing

Research direction

Read ssh/generate_test.go and inspect generateRSAKey(); the issue identifies the key size change that addresses the failing SSH tests. Run the SSH tests to confirm they pass with a 1024 bit key, and consider the work done when the reported RSA signature error no longer occurs.

Written by the indexing model from the issue text.

Description

Recently, the x/crypto library switched to SHA-512 for the default RSA certificate signature, which doesn't fit in 512 bits (https://cs.opensource.google/go/x/crypto/+/b4de73f9ece8163b492578e101e4ef8923ac2c5c). This causes several of the ssh tests to fail with the error "crypto/rsa: message too long for RSA public key size".

Updating generateRSAKey() in ssh/generate_test.go to use a 1024 bit key size fixes the problem.

Dominant language
Go
Stars
209
Forks
88
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from juju/utils

All issues in juju/utils

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.