mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 05:27:48 +00:00
feat: removed ca pool from dialing
This commit is contained in:
@@ -79,13 +79,9 @@ func (g *Gateway) ConnectWithRelay() error {
|
|||||||
|
|
||||||
// Dial TURN Server
|
// Dial TURN Server
|
||||||
if relayPort == "5349" {
|
if relayPort == "5349" {
|
||||||
caCertPool := x509.NewCertPool()
|
|
||||||
caCertPool.AppendCertsFromPEM([]byte(g.config.CertificateChain))
|
|
||||||
|
|
||||||
log.Info().Msgf("Provided relay port %s. Using TLS", relayPort)
|
log.Info().Msgf("Provided relay port %s. Using TLS", relayPort)
|
||||||
conn, err := dtls.Dial("udp", turnAddr, &dtls.Config{
|
conn, err := dtls.Dial("udp", turnAddr, &dtls.Config{
|
||||||
ServerName: relayAddress,
|
ServerName: relayAddress,
|
||||||
RootCAs: caCertPool,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Failed to connect with relay server: %w", err)
|
return fmt.Errorf("Failed to connect with relay server: %w", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user