Crates.io | vanish |
lib.rs | vanish |
version | 0.2.1 |
source | src |
created_at | 2024-08-30 09:54:58.439303 |
updated_at | 2024-09-07 08:52:27.755159 |
description | A simple config tool to make locally trusted X.509 development certificates for your domains |
homepage | |
repository | https://github.com/shubhexists/vanish |
max_upload_size | |
id | 1357543 |
size | 128,244 |
Fast and simple tool to generate development certificates locally, built in Rust.
Vanish follows the X.509 Standards as mentioned in RFC 3280 ( April 2002 ) to match the PKI Standards.
Vanish also follow the XDG Base Direcctory Specification to store the CA Keys.
// To generate certificates
$ vanish generate -d localhost -d www.vedanalytics.in
// to generate certificate requests
$ vanish generate -d localhost --req-only
Generating certificates locally might be the best option rather that generating it from a registered Authority as you have the control of your private key.
Vanish's CLI built in Rust allows you to generate trusted certificates for your domains which you can use for any domain ( even localhost
!! ).
Apart from that, many measures have been taken, keeping performance in mind. Vanish -
Currently Vanish is just distributed through Cargo but we are working full time to support distribution from other package managers.
cargo install vanish
# Install Rust
git clone https://github.com/shubhexists/vanish
cd vanish
cargo build --release
Although Vanish is now functional, it is to be considered that it is still a new project and hence many planned features are yet to be implemented. Vanish has implemented -
.pem
is supported.)These are just the planned ones, It may have many other features. If you have one, file it in the issues !
The Vanish CLI has many parameters to help you generate certificates without much hassle!
Note - Order of these commands don't matter. So, you can place them in any order.
Let's have a look at them -
-d
or --domain
to add a domain to the listvanish generate -d vedanalytics.in -d localhost
--no-ca
to force Vanish to use the default CA in the Data Directory. If it could not find a certificate, it will return a error :Dvanish generate -d vedanalytics.in -d localhost --no-ca
--req-only
to generate a "Certificate Request" rather than a Certificate. You can use this Request to further generate a Certificate.vanish generate -d vedanalytics.in -d localhost --req-only
--keyfile
and --certfile
to provide your own CA certificates. Vanish would then use these certificates to generate your Ceertificate!
Note: You need to provide both
--keyfile
and--certfile
. If you provide just one, Vanish will prompt you a error!
vanish generate -d vedanalytics.in -d localhost --keyfile ./ca-key.pem --certfile ./ca.pem
--csr
to generate certificates from a "Certificate Request" file
Note -
--csr
flag conflicts with the--req-only
flag as you can not generate Requests from a Request right? : D
vanish generate --csr ./csr.pem
-o
or --output
to specify a output directory.
Note: The value of
-o
Argument should be a directory and not a file. Vanish automatically generates the filename to store in the specified directory If you don't specify a directory, the default directories will be the Current Working Directory.
vanish generate --csr ./csr.pem -o ./certificates/
-c
for Country, -cn
for Common Name
, -s
for State. However option, it is a good practice to include these things in your certificate.vanish generate -d vedanalytics.in -d localhost --no-ca -c India -s Delhi
Thank's for reading. Do drop a star ✨ as it helps to spread the words :D