rtsp source: set ServerName when using TLS (#708)

This commit is contained in:
aler9
2021-12-03 23:15:21 +01:00
parent 0d8f14388e
commit a1fed6fb38
5 changed files with 42 additions and 30 deletions

View File

@@ -2,6 +2,7 @@ package core
import (
"bytes"
"crypto/tls"
"encoding/json"
"fmt"
"io"
@@ -202,7 +203,9 @@ func TestAPIPathsList(t *testing.T) {
}()
func() {
source := gortsplib.Client{}
source := gortsplib.Client{
TLSConfig: &tls.Config{InsecureSkipVerify: true},
}
err := source.StartPublishing("rtsps://localhost:8555/mypath",
gortsplib.Tracks{track})
@@ -261,7 +264,9 @@ func TestAPIList(t *testing.T) {
defer source.Close()
case "rtsps":
source := gortsplib.Client{}
source := gortsplib.Client{
TLSConfig: &tls.Config{InsecureSkipVerify: true},
}
err := source.StartPublishing("rtsps://localhost:8555/mypath",
gortsplib.Tracks{track})
@@ -390,7 +395,9 @@ func TestAPIKick(t *testing.T) {
defer source.Close()
case "rtsps":
source := gortsplib.Client{}
source := gortsplib.Client{
TLSConfig: &tls.Config{InsecureSkipVerify: true},
}
err := source.StartPublishing("rtsps://localhost:8555/mypath",
gortsplib.Tracks{track})