Yggdrasil demo initial public room directory (#1181)

* Don't return null to public directory request

* Initial support for finding public rooms in Yggdrasil demo (incomplete)

* Increase QUIC idle time to 15 minutes
This commit is contained in:
Neil Alexander 2020-07-03 14:28:43 +01:00 committed by GitHub
parent 3797c38ec8
commit 3a28ddfb7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 165 additions and 17 deletions

View file

@ -20,6 +20,7 @@ import (
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/hex"
"encoding/pem"
"errors"
@ -127,6 +128,9 @@ func (n *Node) generateTLSConfig() *tls.Config {
panic(err)
}
template := x509.Certificate{
Subject: pkix.Name{
CommonName: n.DerivedServerName(),
},
SerialNumber: big.NewInt(1),
NotAfter: time.Now().Add(time.Hour * 24 * 365),
DNSNames: []string{n.DerivedSessionName()},