service: convert network certfp to lower-case
In tls.Config.VerifyPeerCertificate, we compare it against the result of hex.EncodeToString.
This commit is contained in:
parent
d93251e714
commit
467f8cd187
@ -526,7 +526,7 @@ func (fs *networkFlagSet) update(network *database.Network) error {
|
||||
network.Realname = *fs.Realname
|
||||
}
|
||||
if fs.CertFP != nil {
|
||||
certFP := strings.ReplaceAll(*fs.CertFP, ":", "")
|
||||
certFP := strings.ToLower(strings.ReplaceAll(*fs.CertFP, ":", ""))
|
||||
if _, err := hex.DecodeString(certFP); err != nil {
|
||||
return fmt.Errorf("the certificate fingerprint must be hex-encoded")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user