This repo is to provide examples of using Golang Kernel TLS (https://github.com/secure-for-ai/goktls)
-
Enable the Kernel TLS on Linux.
sudo modprobe tls
-
Disable KTLS
# Disable the tls kernel module sudo modprobe -r tls
Disable KTLS in golang.
Set env
GOKTLS=0
, or omit it in the command. -
Run the server
GOKTLS=1 go run server.go
To print out the debug information, run with
-tags=debug
.GOKTLS=1 go run -tags=debug server.go
-
Run the client
GOKTLS=1 go run client.go
To print out the debug information, run with
-tags=debug
.GOKTLS=1 go run -tags=debug client.go
-
Run clients to test different ciphersuites and TLS versions.
GOKTLS=1 go run client_test_tls_config.go
To print out the debug information, run with
-tags=debug
.GOKTLS=1 go run -tags=debug client_test_tls_config.go