Skip to content
/ mtls Public

Generate self-signed certificates for mutual TLS authentication.

Notifications You must be signed in to change notification settings

doroved/mtls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cargo run -- --help
Generate self-signed certificates for mutual TLS authentication

Usage: mtls [OPTIONS] --server <string> --client <string>

Options:
      --server <string>    Set the server host name.
      --client <string>    Set the client host name.
      --ca-name <string>   Set the name of the CA. Default is "mTLS CA (current_date)".
      --ca-days <u64>      Specify the CA certificate validity in days. Default: max. period.
      --crt-days <u64>     Specify the certificate validity in days. Default: max. period.
      --output-dir <PATH>  Directory path for storing keys and certificates. Default is current directory. [default: .]
      --ecdsa              Use ECDSA algorithm for certificates. Default is RSA.
      --nohost             Disable the use of hostnames for certificate file names.
  -h, --help               Print help
  -V, --version            Print version

How to use

Create self-signed certificates for server 203.0.113.99 and client1, and save keys and certificates in the current directory:

cargo run -- --server 203.0.113.99 --client client1

Create self-signed certificates for server 203.0.113.99 and client2, and save keys and certificates in the certs folder:

cargo run -- --server 203.0.113.99 --client client2 --output-dir './certs'

Ho to build

cargo build --release
./target/release/mtls --help

About

Generate self-signed certificates for mutual TLS authentication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages