secure-for-ai / goktls_examples

Golang Kernel TLS Examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Golang Kernel TLS Examples

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 77.6%Language:Dockerfile 22.4%