/gencsr

Easily generate a certificate signing request (CSR)

Primary LanguagePythonApache License 2.0Apache-2.0

gencsr PyPI

gencsr is a simple tool to generate an x.509 Certificate Signing Request (CSR).

It is opinionated and supports the most basic common use-case: A website with one or more DNS names. Anything more complex than that is better handled by other tools.

Installation

Just install from PyPI:

$ pip install gencsr

Usage

The hostname is always included in the list of DNS names (Subject Alternative Name).

You can either pass options on the command line:

$ gencsr --hostname example.com --dns-name www.example.com --dns-name login.example.com

Or you can use a config file, in which case no other command line options are allowed (they are not merged). This is equivalent to the previous example.

hostname = "example.com"
dns_names = [
    "www.example.com",
    "login.example.com",
]
$ gencsr --config example.com.toml