Skip to content

Commit

Permalink
Add a runner for botan tls_client
Browse files Browse the repository at this point in the history
  • Loading branch information
randombit committed May 24, 2024
1 parent f665d57 commit 2d16ee5
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
43 changes: 43 additions & 0 deletions test-suites/impltests/botan.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package impltests

import (
"fmt"
test_executor "github.com/Netflix/bettertls/test-suites/test-executor"
)

type BotanRunner struct {
version string
}

func (o *BotanRunner) Name() string {
return "botan"
}

func (o *BotanRunner) Initialize() error {
var err error
o.version, err = execAndCapture("botan", "version", "--full")
if err != nil {
return err
}
return nil
}

func (o *BotanRunner) Close() error {
return nil
}

func (o *BotanRunner) GetVersion() string {
return o.version
}

func (o *BotanRunner) RunTests(ctx *test_executor.ExecutionContext) (map[string]*test_executor.SuiteTestResults, error) {
return testExec(ctx, func(caPath string, hostname string, tlsPort uint) []string {
args := []string{"botan", "tls_client",
"--skip-system-cert-store",
fmt.Sprintf("--trusted-cas=%s", caPath),
fmt.Sprintf("--port=%d", tlsPort),
hostname}

return args
})
}
1 change: 1 addition & 0 deletions test-suites/impltests/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type ImplementationRunner interface {

var Runners = map[string]ImplementationRunner{
"boringssl": &BoringSslRunner{},
"botan": &BotanRunner{},
"curl": &CurlRunner{},
"envoy": &EnvoyRunner{},
"gnutls": &GnutlsRunner{},
Expand Down

0 comments on commit 2d16ee5

Please sign in to comment.