mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 12:44:08 +01:00
- Go 1.27, Bibliotheken nachgezogen (x/crypto 0.59, lipgloss 2.1, ultraviolet, x/sys, ristretto255 0.2) - PuTTY-Import ohne veraltete ECDSA-API; staticcheck sauber und als CI-Job lint - checksums.txt nennt die Version und ist mit signiert (update.SumsVersion); release.yml in build/sign/publish getrennt, Schlüssel nur im Job sign - Release mit Herkunftsnachweis (attest-build-provenance) und SBOM (CycloneDX); Codesignatur Windows/macOS vorbereitet (nur mit Secrets, docs/codesignatur.md) - Alte SSH-Verfahren: gelber Hinweis beim Verbinden, Host-Übersicht zeigt SSH-Verfahren / quantensicher - Vermittler und LAN-Teilen nur noch TLS 1.3 - KI: response_format json_object für Ziel/Agent/Plan, Prompt-Caching für Claude, Claude ab 4.7 ohne temperature, NoThink je Modell (thinking disabled bzw. effort low), Ablehnung (refusal) als Meldung, abgelehnte Felder je Endpunkt gemerkt - Vorbelegung qwen3:8b / gpt-5-mini - MCP 2026-07-28 (server/discover, _meta-Version, resultType), initialize für alte Clients Claude-Session: https://claude.ai/code/session_018i4GUhLGo5pLYYKwLBkYN9 Co-authored-by: Claude <noreply@anthropic.com>
46 lines
1.4 KiB
Go
46 lines
1.4 KiB
Go
package sshx
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"golang.org/x/crypto/ssh"
|
|
|
|
"github.com/db9979/sshtermy/internal/domain"
|
|
)
|
|
|
|
// Ein Gerät, das nur SHA-1-Schlüsseltausch und CBC kann: sshTermy verbindet
|
|
// über den Rückfall und meldet die alten Verfahren.
|
|
func TestOldAlgorithmsReported(t *testing.T) {
|
|
fs := startFakeSwitchWith(t, "SSH-2.0-RomSShell_5.40", func(c *ssh.ServerConfig) {
|
|
c.KeyExchanges = []string{ssh.InsecureKeyExchangeDH14SHA1}
|
|
c.Ciphers = []string{ssh.InsecureCipherAES128CBC}
|
|
c.MACs = []string{ssh.HMACSHA1}
|
|
})
|
|
cl := dialFake(t, fs, domain.DeviceNetwork)
|
|
if len(cl.Weak) == 0 {
|
|
t.Fatalf("alte Verfahren nicht erkannt: %+v", cl.Algos)
|
|
}
|
|
note := cl.WeakNote()
|
|
for _, want := range []string{"diffie-hellman-group14-sha1", "aes128-cbc"} {
|
|
if !strings.Contains(note, want) {
|
|
t.Errorf("Hinweis nennt %s nicht: %q", want, note)
|
|
}
|
|
}
|
|
if cl.PostQuantum() {
|
|
t.Error("SHA-1-Schlüsseltausch als quantensicher gemeldet")
|
|
}
|
|
}
|
|
|
|
// Moderner Server: kein Hinweis, Schlüsseltausch quantensicher (Vorgabe von x/crypto).
|
|
func TestModernAlgorithmsQuiet(t *testing.T) {
|
|
fs := startFakeSwitch(t, "SSH-2.0-RomSShell_5.40")
|
|
cl := dialFake(t, fs, domain.DeviceNetwork)
|
|
if cl.WeakNote() != "" {
|
|
t.Fatalf("Hinweis bei modernem Server: %q", cl.WeakNote())
|
|
}
|
|
if !cl.PostQuantum() {
|
|
t.Errorf("Schlüsseltausch %q nicht quantensicher", cl.Algos.KeyExchange)
|
|
}
|
|
}
|