Skip to content

influx6/tlsfs

Repository files navigation

TLSFS

Go Report Card Travis CI Circle CI

Filesystem-like manager to provide TLS/SSL certificate creation, renewal and retrieval.

Install

go get -u github.com/wirekit/tlsfs

Examples

Below are examples of creating a tlsfs Filesystem based on using Let's Encrypt as the desired CA authority.

In-Memory Lets Encrypt CA

import (
	"os"

	"github.com/wirekit/tlsfs/fs/memfs"
	"github.com/wirekit/tlsfs/tlsp/acme"
)

var config acme.Config
config.HTTPChallengePort = 3550
config.TLSSNIChallengePort = 4433
config.EnableHTTP01Challenge = true
config.UsersFileSystem = memfs.NewMemFS()
config.CertificatesFileSystem = memfs.NewMemFS()
config.CAURL = "https://acme-v01.api.letsencrypt.org/directory"

service := acme.NewAcmeFS(config)
service.Create("bob@gmail.com", "*.westros.com")

FileSystem Lets Encrypt CA

import (
	"os"

	"github.com/wirekit/tlsfs/fs/sysfs"
	"github.com/wirekit/tlsfs/tlsp/acme"
)

var config acme.Config
config.HTTPChallengePort = 3550
config.TLSSNIChallengePort = 4433
config.EnableHTTP01Challenge = true
config.UsersFileSystem = sysfs.NewSystemZapFS("acme/users")
config.CertificatesFileSystem = sysfs.NewSystemZapFS("acme/certs")
config.CAURL = "https://acme-v01.api.letsencrypt.org/directory"

service := acme.NewAcmeFS(config)
service.Create("bob@gmail.com", "*.westros.com")

Vendoring

Vendoring was done with Dep.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published