mirror of
https://github.com/fosrl/newt.git
synced 2026-03-05 18:26:42 +00:00
feat/mtls-support-cert: config support
This commit is contained in:
7
main.go
7
main.go
@@ -321,13 +321,8 @@ func main() {
|
||||
}
|
||||
var opt websocket.ClientOption
|
||||
if tlsPrivateKey != "" {
|
||||
tlsConfig, err := websocket.LoadClientCertificate(tlsPrivateKey)
|
||||
if err != nil {
|
||||
logger.Fatal("Failed to load client certificate: %v", err)
|
||||
}
|
||||
opt = websocket.WithTLSConfig(tlsConfig)
|
||||
opt = websocket.WithTLSConfig(tlsPrivateKey)
|
||||
}
|
||||
|
||||
// Create a new client
|
||||
client, err := websocket.NewClient(
|
||||
id, // CLI arg takes precedence
|
||||
|
||||
Reference in New Issue
Block a user