mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-30 08:28:20 +02:00
use tlsClientConfig instead of custom dialer
This commit is contained in:
parent
753eeff12f
commit
bfadf123d5
6 changed files with 52 additions and 7 deletions
|
@ -3,6 +3,7 @@ package proxy
|
|||
import (
|
||||
"context"
|
||||
"crypto/cipher"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
|
@ -61,9 +62,13 @@ func newProxyStateFromConfig(cfg *config.Config) (*proxyState, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tlsConfig, err := cfg.GetTLSClientConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
state.authenticateKeyFetcher = hpke.NewKeyFetcher(authenticateURL.ResolveReference(&url.URL{
|
||||
Path: "/.well-known/pomerium/jwks.json",
|
||||
}).String())
|
||||
}).String(), &http.Transport{TLSClientConfig: tlsConfig, ForceAttemptHTTP2: true})
|
||||
|
||||
state.sharedCipher, err = cryptutil.NewAEADCipher(state.sharedKey)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue