Skip to content

secure-for-ai/goktls_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples of Golang Kernel TLS

This repo is to provide examples of using Golang Kernel TLS (https://github.com/secure-for-ai/goktls)

Echo

  • 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

Releases

No releases published

Packages

No packages published