mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-03 06:22:56 +03:00
Pull request 2347: AGDNS-2690-global-context
Merge in DNS/adguard-home from AGDNS-2690-global-context to master Squashed commit of the following: commit 58d5999e5d9112b3391f988ed76e87eff2919d6b Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Wed Feb 19 18:51:41 2025 +0300 home: imp naming commit cfb371df59c816be1022d499cc41ffaf2b72d124 Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Wed Feb 19 18:42:52 2025 +0300 home: global context
This commit is contained in:
parent
a5b073d070
commit
1e0873aa71
16 changed files with 203 additions and 203 deletions
internal/home
|
@ -112,7 +112,7 @@ func (m *tlsManager) start() {
|
|||
// The background context is used because the TLSConfigChanged wraps context
|
||||
// with timeout on its own and shuts down the server, which handles current
|
||||
// request.
|
||||
Context.web.tlsConfigChanged(context.Background(), tlsConf)
|
||||
globalContext.web.tlsConfigChanged(context.Background(), tlsConf)
|
||||
}
|
||||
|
||||
// reload updates the configuration and restarts t.
|
||||
|
@ -160,7 +160,7 @@ func (m *tlsManager) reload() {
|
|||
// The background context is used because the TLSConfigChanged wraps context
|
||||
// with timeout on its own and shuts down the server, which handles current
|
||||
// request.
|
||||
Context.web.tlsConfigChanged(context.Background(), tlsConf)
|
||||
globalContext.web.tlsConfigChanged(context.Background(), tlsConf)
|
||||
}
|
||||
|
||||
// loadTLSConf loads and validates the TLS configuration. The returned error is
|
||||
|
@ -463,7 +463,7 @@ func (m *tlsManager) handleTLSConfigure(w http.ResponseWriter, r *http.Request)
|
|||
// same reason.
|
||||
if restartHTTPS {
|
||||
go func() {
|
||||
Context.web.tlsConfigChanged(context.Background(), req.tlsConfigSettings)
|
||||
globalContext.web.tlsConfigChanged(context.Background(), req.tlsConfigSettings)
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ func validateCertChain(certs []*x509.Certificate, srvName string) (err error) {
|
|||
|
||||
opts := x509.VerifyOptions{
|
||||
DNSName: srvName,
|
||||
Roots: Context.tlsRoots,
|
||||
Roots: globalContext.tlsRoots,
|
||||
Intermediates: pool,
|
||||
}
|
||||
_, err = main.Verify(opts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue