From 996c6b4f474bba3e80ba0b9c3c737a7a4909cdd8 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Wed, 23 Oct 2019 20:28:11 -0500 Subject: [PATCH] add one TODO comment and run gofmt --- src/yggdrasil/tls.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yggdrasil/tls.go b/src/yggdrasil/tls.go index 78fe3a9..7212c4d 100644 --- a/src/yggdrasil/tls.go +++ b/src/yggdrasil/tls.go @@ -38,6 +38,7 @@ func (t *tcptls) init(tcp *tcp) { certBuf := &bytes.Buffer{} + // TODO: because NotAfter is finite, we should add some mechanism to regenerate the certificate and restart the listeners periodically for nodes with very high uptimes. Perhaps regenerate certs and restart listeners every few months or so. pubtemp := x509.Certificate{ SerialNumber: big.NewInt(1), Subject: pkix.Name{ @@ -65,7 +66,7 @@ func (t *tcptls) init(tcp *tcp) { t.config = &tls.Config{ RootCAs: cpool, Certificates: []tls.Certificate{ - tls.Certificate{ + { Certificate: [][]byte{derbytes}, PrivateKey: edpriv, },