mirror of
https://github.com/FlipsideCrypto/convox.git
synced 2026-02-06 10:56:56 +00:00
router: refuse to generate certificates for unknown hosts (#68)
This commit is contained in:
parent
e9f72c5ada
commit
2e7b2de757
@ -238,6 +238,14 @@ func (r *Router) generateCertificateAutocert(m *autocert.Manager) func(*tls.Clie
|
||||
return common.CertificateSelfSigned("convox")
|
||||
}
|
||||
|
||||
ts, err := r.storage.TargetList(hello.ServerName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(ts) == 0 {
|
||||
return nil, fmt.Errorf("unknown host")
|
||||
}
|
||||
|
||||
c, err := m.GetCertificate(hello)
|
||||
if err != nil {
|
||||
fmt.Printf("err: %+v\n", err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user