msl.network.cli_certgen module

Command line interface for the certgen command.

To see the help documentation, run the following command in a terminal:

msl-network certgen --help

Generate a self-signed PEM certificate.

The certificate uses the hostname of the computer that this command was executed on as the Common Name and as the Issuer Name.

The certgen command is similar to the openssl command to generate a self-signed certificate from a pre-existing private key:

openssl req -key private.key -new -x509 -days 365 --out certificate.crt

Examples:

# create a default certificate using the default private key
# and save it to the default directory
msl-network certgen

# create a certificate using the specified key and
# save the certificate to the specified file
msl-network certgen --key-file /path/to/key.pem /path/to/cert.pem

See Also:

msl-network keygen
msl-network certdump
msl.network.cli_certgen.add_parser_certgen(parser)[source]

Add the certgen command to the parser.

msl.network.cli_certgen.execute(args)[source]

Executes the certgen command.