Coder Social home page Coder Social logo

tls-tool's Introduction

tls-tool

I needed to create a CA and a few server and client certificates for my ssl_exporter tests but I found doing it repeatedly with openssl was tiresome. I'm a big fan of the consul tls client but I wanted more control over the content of the certificates. So, I've copied the code from consul and tweaked it a bit for my purposes.

Usage

$ tls-tool --help
usage: tls-tool [<flags>] <command> [<args> ...]

A tool for creating TLS certificates quickly

Flags:
  --help  Show context-sensitive help (also try --help-long and --help-man).

Commands:
  help [<command>...]
    Show help.

  ca create [<flags>]
    Create a new certificate authority

  cert create [<flags>]
    Create a new certificate
$ tls-tool ca create --help
usage: tls-tool ca create [<flags>]

Create a new certificate authority

Flags:
  --help                       Show context-sensitive help (also try --help-long and --help-man).
  --domain="ribbybibby.me"     Domain
  --days=1825                  Provide number of days the CA is valid for from now on
  --name-constraint            Add name constraints for the CA?
  --additional-name-constraint=ADDITIONAL-NAME-CONSTRAINT ...  
                               Add additional name constraints for the CA.
  --country="GB"               Country
  --postal-code="SW18XXX"      Postal code
  --province="England"         Province
  --locality="London"          Locality
  --street-address="123 Fake St"  
                               Street Address
  --organization="ribbybibby"  Organization
$ tls-tool cert create --help
usage: tls-tool cert create [<flags>]

Create a new certificate

Flags:
  --help                    Show context-sensitive help (also try --help-long and --help-man).
  --ca=ca.pem               Provide path to the ca
  --key=ca-key.pem          Provide path to the key
  --days=365                Provide number of days the certificate is valid for from now on
  --domain="ribbybibby.me"  Domain
  --additional-dnsname=ADDITIONAL-DNSNAME ...  
                            Provide additional dnsnames for Subject Alternative Names.
  --insecure                Optionally allow the creation of purposely expired or otherwise invalid certs

Example

Create a CA:

$ tls-tool ca create
==> Saved ca.pem
==> Saved ca-key.pem

Create a certificate:

$ tls-tool cert create
==> Using ca.pem and ca-key.pem
==> Saved cert-ribbybibby.me-0.pem
==> Saved cert-ribbybibby.me-0-key.pem

tls-tool's People

Contributors

ribbybibby avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.