Peter Kurfer
460940e4d8
- fixed fallback to P256 curve - added option to configure minimal TLS version - added option to include insecure cipher suites
25 lines
576 B
Go
25 lines
576 B
Go
package tls_interceptor
|
|
|
|
import (
|
|
"github.com/baez90/inetmock/pkg/api"
|
|
"github.com/baez90/inetmock/pkg/logging"
|
|
"github.com/google/uuid"
|
|
"go.uber.org/zap"
|
|
"sync"
|
|
)
|
|
|
|
func init() {
|
|
logger, _ := logging.CreateLogger()
|
|
logger = logger.With(
|
|
zap.String("ProtocolHandler", name),
|
|
)
|
|
|
|
api.Registry().RegisterHandler(name, func() api.ProtocolHandler {
|
|
return &tlsInterceptor{
|
|
logger: logger,
|
|
currentConnectionsCount: &sync.WaitGroup{},
|
|
currentConnections: make(map[uuid.UUID]*proxyConn),
|
|
connectionsMutex: &sync.Mutex{},
|
|
}
|
|
})
|
|
}
|