forked from quic-go/quic-go
move function to create the TLS key log file to a separate file
This commit is contained in:
19
interop/utils/logging.go
Normal file
19
interop/utils/logging.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
// GetSSLKeyLog creates a file for the TLS key log
|
||||
func GetSSLKeyLog() (io.WriteCloser, error) {
|
||||
filename := os.Getenv("SSLKEYLOGFILE")
|
||||
if len(filename) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
f, err := os.Create(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return f, nil
|
||||
}
|
||||
Reference in New Issue
Block a user