even spicier change to rehandshake if we detect our cert is lower-version than our peer, and we have a newer-version cert available

This commit is contained in:
JackDoan
2025-09-10 13:32:41 -05:00
parent 0946831f88
commit 41273a94bb
4 changed files with 104 additions and 7 deletions

View File

@@ -23,9 +23,12 @@ func ixHandshakeStage0(f *Interface, hh *HandshakeHostInfo) bool {
return false
}
// If we're connecting to a v6 address we must use a v2 cert
cs := f.pki.getCertState()
v := cs.initiatingVersion
if hh.initiatingVersionOverride != cert.VersionPre1 {
v = hh.initiatingVersionOverride
}
// If we're connecting to a v6 address we must use a v2 cert
for _, a := range hh.hostinfo.vpnAddrs {
if a.Is6() {
v = cert.Version2