The CAW driver is our native certificate authority driver. In essence, it is a shell script encompassing ordinary OpenSSL certificate authority. This has many pros:
It also has some cons:
CAW is a shell wrapper above the OpenSSL-based certificate authority (abbreviated: OSSL CA). It allows you to use the OSSL CA in a similar way the EasyRSA does. CAW is primarily created as a CA backend for the CzechIdM Certificate Authority module but it is possible to extend/incorporate it somewhere else. It also provides an user-friendly CA implementation which can be used right away from the command line.
For the list of capabilities and input/output formats, please refer to the CAW shell script. Simply run CAW to get the usage screen where you can find everything you will ever need. :)
./caw Unknown command '' specified. Usage: ./caw command [--param1 value1 --param2 value2 ...] ... COMMAND create-key-and-cert - generates new private key, CSR and signs a certificate OUTPUT Success: Serial number of the issued certificate written onto STDOUT. Return code 0. Error: Error message on STDERR. Return code 1. PARAMETERS --country countryName. Mandatory. --state stateOrProvinceName. Mandatory. --locality localityName. Mandatory. --org organizationName. Mandatory. --ou organizationalUnitName. Mandatory. --cn commonName. Mandatory. --mail emailAddress. Mandatory. --pass private key passphrase. Mandatory. ... and so on ...
In its core, CAW uses a well-known OSSL CA all with its openssl.cnf file and such. Therefore every configuration which can be specified in openssl.cnf can be made available in the CAW. CAW makes use of openssl.cnf as often as possible (i.e. with defaults for the openssl req command) and very often invokes openssl using -batch argument.
But beware, CAW has also its own configuration file caw_settings.source. This file contains some options that need to be in sync with options in openssl.cnf. So if you are fiddling with openssl.cnf, always also check caw_settings.source.
Additional information can be found in one of those three places:
[root@ca ~]# useradd -r -m -s /bin/bash authority1
[root@ca ~]# mv caw.tgz /home/authority1/ [root@ca authority1]# tar xzf caw.tgz [root@ca authority1]# ll total 28 drwxr-xr-x 4 1000 users 4096 Aug 24 14:36 caw -rw-r--r-- 1 root root 24563 Aug 24 15:16 caw.tgz [root@ca authority1]# chown -Rf authority1:authority1 caw/ [root@ca authority1]# chmod 750 caw
[root@ca authority1]# cd caw/ [root@ca caw]# chmod 750 caw
[root@ca caw]# cd ca/ [root@ca ca]# openssl rand -hex 16 > serial
[root@ca ca]# su - authority1 [authority1@ca ~]$ cd caw/ca/ [authority1@ca ca]$ pwd /home/authority1/caw/ca [authority1@ca ca]$ openssl genrsa -out private/ca.key 2048 [authority1@ca ca]$ chmod 400 private/ca.key [authority1@ca ca]$ openssl req -new -in private/ca.key -out ca.csr -key private/ca.key [authority1@ca ca]$ openssl x509 -req -in ca.csr -signkey private/ca.key -days 1000 -out ca.crt -sha256 -extfile ../ca_crt.extensions [authority1@ca ca]$ rm ca.csr
[authority1@ca caw]$ ./caw create-crl
[root@ca ~]# ./caw create-key-and-cert --country CZ --state "Czech Republic" --locality Prague --org BCV --ou TEST --cn user.test.bcv --pass demodemo 0C0774BACDF2CA2A52BEEF68A0F1D411
[root@ca ~]# ./caw prolong-cert --serial 0C0774BACDF2CA2A52BEEF68A0F1D411 0C0774BACDF2CA2A52BEEF68A0F1D412
[root@ca ~]# ./caw get-cert --serial 0C0774BACDF2CA2A52BEEF68A0F1D411 --with-pkey --pass demodemo --with-chain MIIKoQIBAzCCCmcGCSqGSIb3DQEHAaCCClgEggpUMIIKUDCCBQcGCSqGSIb3DQEHBqCCBPgwggT0 ... FbAM6nS5jJYQ4s4VKDElMCMGCSqGSIb3DQEJFTEWBBRGj5/LUBZtcz/k+N96L7RzdleanDAxMCEw CQYFKw4DAhoFAAQUCqImx0Un2qmtSACpEWD4i2ivunMECFJnEuzDIEtHAgIIAA==
[root@ca ~]# ./caw revoke-cert --serial 0C0774BACDF2CA2A52BEEF68A0F1D411 --reason keyCompromise
[root@ca ~]# ./caw create-crl