Skip to content

Commit 941a7b6

Browse files
committed
Bring FS info level down to INFO, but store this information with the cert
1 parent 25664b9 commit 941a7b6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

dnscrypt-proxy/certs.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ type CertInfo struct {
1919
SharedKey [32]byte
2020
MagicQuery [ClientMagicLen]byte
2121
CryptoConstruction CryptoConstruction
22+
ForwardSecurity bool
2223
}
2324

2425
func FetchCurrentCert(proxy *Proxy, proto string, pk ed25519.PublicKey, serverAddress string, providerName string) (CertInfo, int, error) {
@@ -77,7 +78,10 @@ func FetchCurrentCert(proxy *Proxy, proto string, pk ed25519.PublicKey, serverAd
7778
}
7879
ttl := tsEnd - tsBegin
7980
if ttl > 86400*7 {
80-
dlog.Warnf("[%v] the key validity period for this server is excessively long (%d days), significantly reducing reliability and forward security.", providerName, ttl/86400)
81+
dlog.Infof("[%v] the key validity period for this server is excessively long (%d days), significantly reducing reliability and forward security.", providerName, ttl/86400)
82+
certInfo.ForwardSecurity = false
83+
} else {
84+
certInfo.ForwardSecurity = true
8185
}
8286
if now > tsEnd || now < tsBegin {
8387
dlog.Debugf("[%v] Certificate not valid at the current date", providerName)

0 commit comments

Comments
 (0)