The key keeper is ssh-client's published package sshkeys, taken by series by the three build modules; Said, KindBuilder, ExecRunnerClean from the Delivery sdk (B5d; ADR 0634 §1; issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.novox.be/novox/mesh-catalog/modules/ssh-client/sshkeys"
|
||||
"git.novox.be/novox/mesh-sdk/go/forgekey"
|
||||
)
|
||||
|
||||
@@ -183,15 +184,15 @@ func TestAPublicHalfThatIsAnotherKeysIsFound(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFingerprintsAreSshKeygens(t *testing.T) {
|
||||
k, err := forgekey.ParseKeyLine("from=\"10.0.0.0/8,192.0.2.1\",no-pty " + edPub)
|
||||
k, err := sshkeys.ParseKeyLine("from=\"10.0.0.0/8,192.0.2.1\",no-pty " + edPub)
|
||||
if err != nil || k.Fingerprint != edFP || k.Bits != 256 || k.Comment != "op@laptop" || !strings.HasPrefix(k.Options, "from=") {
|
||||
t.Fatalf("%+v %v", k, err)
|
||||
}
|
||||
k, _ = forgekey.ParseKeyLine(rsaPub)
|
||||
k, _ = sshkeys.ParseKeyLine(rsaPub)
|
||||
if k.Fingerprint != rsaFP || k.Bits != 2048 || !strings.Contains(k.Weak, "below 3072") {
|
||||
t.Fatalf("%+v", k)
|
||||
}
|
||||
if _, err := forgekey.ParseKeyLine("ssh-ed25519 !!!notbase64"); err == nil {
|
||||
if _, err := sshkeys.ParseKeyLine("ssh-ed25519 !!!notbase64"); err == nil {
|
||||
t.Fatal("garbage accepted")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user