https://github.com/influx6/tlsfs
https://github.com/influx6/tlsfs
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/influx6/tlsfs
- Owner: influx6
- License: mit
- Created: 2019-11-12T03:37:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-12T03:37:51.000Z (almost 6 years ago)
- Last Synced: 2024-04-16T08:57:52.196Z (over 1 year ago)
- Language: Go
- Size: 4.68 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
TLSFS
--------
[](https://goreportcard.com/report/github.com/wirekit/tlsfs)
[](https://travis-ci.org/wirekit/tlsfs)
[](https://circleci.com/gh/wirekit/tlsfs)Filesystem-like manager to provide TLS/SSL certificate creation, renewal and retrieval.
## Install
```bash
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
```go
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
```go
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](https://github.com/golang/dep).