Skip to content
A Go package for creating temporary test certificates
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
testcerts.go
testcerts_test.go

README.md

testcerts

Build Status Coverage Status Go Report Card Documentation license

A Go package for creating temporary x509 test certificates

There are many Certificate generation tools out there, but most focus on being a CLI tool. This package is focused on providing helper functions for creating Certificates. These helper functions can be used as part of Go tests per the example below.

func TestSomething(t *testing.T) {
  err := testcerts.GenerateCertsToFile("/tmp/cert", "/tmp/key")
  if err != nil {
    // do stuff
  }

  _ = something.Run("/tmp/cert", "/tmp/key")
  // do more testing
}

The goal of this package, is to make testing TLS based services easier. Without having to leave the comfort of your editor, or place test certificates in your repo.

You can’t perform that action at this time.