mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-18 02:50:43 +02:00
* Separate shared code dependencies * Fix import * Test respective shared code * Update openapi ref * Fix test * Fix test path
18 lines
328 B
Go
18 lines
328 B
Go
//go:build !devcert
|
|
|
|
package tls
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"fmt"
|
|
)
|
|
|
|
func ServerQUICTLSConfig(originTLSCfg *tls.Config) (*tls.Config, error) {
|
|
if originTLSCfg == nil {
|
|
return nil, fmt.Errorf("valid TLS config is required for QUIC listener")
|
|
}
|
|
cfg := originTLSCfg.Clone()
|
|
cfg.NextProtos = []string{nbalpn}
|
|
return cfg, nil
|
|
}
|