mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 02:12:50 +02:00
use tlsClientConfig instead of custom dialer (#3830)
* use tlsClientConfig instead of custom dialer * rm debug log
This commit is contained in:
parent
5252cbda23
commit
a49f86d023
6 changed files with 49 additions and 7 deletions
|
@ -3,6 +3,7 @@ package proxy
|
|||
import (
|
||||
"context"
|
||||
"crypto/cipher"
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
|
@ -61,9 +62,15 @@ func newProxyStateFromConfig(cfg *config.Config) (*proxyState, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
state.authenticateKeyFetcher = hpke.NewKeyFetcher(authenticateURL.ResolveReference(&url.URL{
|
||||
|
||||
jwksURL := authenticateURL.ResolveReference(&url.URL{
|
||||
Path: "/.well-known/pomerium/jwks.json",
|
||||
}).String())
|
||||
}).String()
|
||||
transport, err := config.GetTLSClientTransport(cfg)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("authorize: get tls client config: %w", err)
|
||||
}
|
||||
state.authenticateKeyFetcher = hpke.NewKeyFetcher(jwksURL, transport)
|
||||
|
||||
state.sharedCipher, err = cryptutil.NewAEADCipher(state.sharedKey)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue