easy-rsa
easy-rsa copied to clipboard
Command `write` syntax details
Introduction: Command write is essentially used internally to supply the required configuration files, on demand. Command write code is exposed for testing purposes.
Command write syntax:
easyrsa write <type> <filename>[overwrite] Does not over write an existing file, unless optionoverwriteis given.easyrsa write <type> > "$your_file"- Redirect as necessary. Caution! Will over write an existing file.easyrsa write <type>- Write type tostdout. Test this!
Command write does not require a PKI. It can be tested as-is.
Please, take care to not over write your current working files.
<type> is required, listed below:
ssl-cnf- Print defaultopenssl-easyrsa.cnf.safe-cnf- Print fully expandedsafessl-easyrsa.cnf. RequiresEASYRSA_TEMP_DIRto be an existing directory.vars- Print defaultvars.example.pki/vars.exampleis always created atinit-pki.COMMON|ca|server|serverClient|client|codeSigning|email|kdcPrint defaultx509-typesfile by name.
<filename> is optional:
- If
<filename>is specified then files are output to<filename>. - Existing files of the same name are always preserved, unless option
overwriteis given. safessl-easyrsa.cnfhas never been an existing file, NEVER preserved.- Only type
legacy-hard(See below) will over write existing files.
It is also suitable to redirect output as required:
easyrsa write <type> > $your-file- Destructive, use with caution.
There are also two composite types to write:
legacy- Create allpki/x509-typesfiles andpki/openssl-easyrsa.cnflegacy-hard- Create and OVERWRITE existing files, aslegacyabove.- Note: Both require a working PKI (
init-pki) and cannot use file redirection.