RPRX 2025-01-25 10:51:44 +00:00 committed by GitHub
parent a0822cb440
commit 2522cfd7be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 105 additions and 56 deletions

View file

@ -410,6 +410,7 @@ type TLSConfig struct {
PinnedPeerCertificatePublicKeySha256 *[]string `json:"pinnedPeerCertificatePublicKeySha256"`
CurvePreferences *StringList `json:"curvePreferences"`
MasterKeyLog string `json:"masterKeyLog"`
ServerNameToVerify string `json:"serverNameToVerify"`
}
// Build implements Buildable.
@ -468,6 +469,10 @@ func (c *TLSConfig) Build() (proto.Message, error) {
}
config.MasterKeyLog = c.MasterKeyLog
config.ServerNameToVerify = c.ServerNameToVerify
if config.ServerNameToVerify != "" && config.Fingerprint == "unsafe" {
return nil, errors.New(`serverNameToVerify only works with uTLS for now`)
}
return config, nil
}