28 Commits

Author SHA1 Message Date
Richard T Bonhomme
d29183721f
sign-req: Allow the CSR DN-field order to be preserved
When signing a request, EasyRSA ALWAYS defaults to the CA defined
Distinguished Name field order, as defined by openssl-easyrsa.cnf
configuration file.

In the unlikely event that a CSR is received with a different DN-
field order, that order can be preserved for the signed certificate.

Command 'sign-req', now has a command option 'preserve' for this.

Additional:

Use of 'preserve = yes' in openssl-easyrsa.cnf has no effect for
EasyRSA.

Testing OpenSSL directly indicates that this option may have no effect
when used in OpenSSL default configuration file openssl.cnf

Also, OpenSSL documentation for command 'ca', option '-preserveDN'
does NOT infer that this option can be used in the configuration file.

None of which is important to EasyRSA because only foreign CSRs can
have a different DN-field order, so default behavior can remain.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-06-30 21:28:41 +01:00
Richard T Bonhomme
625dae2339
vars.example: Rename EASYRSA_CERT_EXPIRE to EASYRSA_PRE_EXPIRE_WINDOW
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 22:05:09 +01:00
Richard T Bonhomme
5c36c478fb
vars.example: Add EASYRSA_NO_PASS and wrap long lines
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-11-23 21:53:46 +00:00
Richard T Bonhomme
368de14fc1
vars.example: Remove EASYRSA_REQ_CN and EASYRSA_TEMP_FILE
Squashed commit of the following:

commit c27825c3bc5dddaeb3749d7a315a77239146ad22
Merge: 02f13f6 93da550
Author: Richard T Bonhomme <tincantech@protonmail.com>
Date:   Tue Oct 25 20:50:44 2022 +0100

    Merge branch 'vars-remove-req-cn' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-vars-remove-req-cn

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>

commit 93da55003cee29695616d01243aecddcf7954c25
Author: Richard T Bonhomme <tincantech@protonmail.com>
Date:   Fri Oct 21 21:10:08 2022 +0100

    vars.example: Minor corrections and formatting

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>

commit 9976f3f0d13a73827052f490438b95153a1b7576
Author: Richard T Bonhomme <tincantech@protonmail.com>
Date:   Fri Oct 21 20:57:07 2022 +0100

    vars.example: Remove EASYRSA_TEMP_FILE

    Closes: #729

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>

commit 8a35375f84ab88b6f009e5971ddb7358f6619a03
Author: Richard T Bonhomme <tincantech@protonmail.com>
Date:   Fri Oct 21 20:44:53 2022 +0100

    vars.example: Remove EASYRSA_REQ_CN

    Closes: #730

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-10-25 20:51:51 +01:00
Richard T Bonhomme
8a0702329c
Unsupported characters: Correct check and warning message
Since the introduction of 'escape_hazard()' function, all characters
except (`) backtick are supported.

This patch brings vars.example in line with the warning in easyrsa and
also only warns about backtick.

It is possible that curly brace '{}' may also cause OpenSSL to behave
strangely. However, the strange behaviour, which I previously observed,
may have been rectified by OpenSSL.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-08-20 17:33:39 +01:00
Richard T Bonhomme
78f17179d6
Remove restrictive 30-day window hindering 'renew'
Ref: https://github.com/OpenVPN/easy-rsa/issues/593

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-06-06 14:55:43 +01:00
Richard T Bonhomme
7a5212c9a9
Introduce '--fix-offset' for fixed start/end date certificates
The initial idea was to mask the actual certificate creation date.
The reason was to further anonymise user certificates. (YMMV)

There is now a second part to this date "fixing":
* This allows for all certificates to expire on the same day.

Using command option '--fix-offset=nnn', all certificates will be created
* with a 'notBefore' date of January 1st of the current year.
* with a 'notAfter' date of the day-of-year number from '--fix-offset',
  in the final year, as per EASYRSA_CERT_EXPIRE (Default 825 days).
  The default 825 days results in 2 years plus the offset given.

This can also be set in the 'vars' file, for convenience.

The default day-of-year offered is 183; either July 2 or 3 (leap year).

Follow-up to: #550 (Replaces 'nodatetime' with '--fix-offset')

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-05-03 20:25:00 +01:00
Richard T Bonhomme
5e57887c39
Harden sourcing vars and warn for potential problems
In 'org' mode, fields such as EASYRSA_REQ_ORG can be abused.

If the field contains single quote ('), ampersand (&), back-tick (`),
dollar sign ($) or hash (#) then the result is undefined.

Due to EasyRSA running on Linux and Windows and supporting multiple
SSL Libraries, it is not feasible to support these characters.

Add a check to determine if any unsupported characters are found in
the vars file and issue a warning if they are found.

Add a sub-shell test to source vars.  If the test fails then exit
gracefully, with a specific error message.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-28 18:52:21 +01:00
Richard T Bonhomme
b4ab1713c1
Remove all use of single quote (') from vars.example
A step toward a solution to #364

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-08 02:11:17 +01:00
Richard T Bonhomme
5255d90b9a
Merge branch: 'safessl-patch' of github.com/Prouflon/easy-rsa-1
Change '$EASYRSA_SSL_CONF' to correct default value in example file.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-03-27 17:39:34 +01:00
a1346054
212c18a83c
Trim excess whitespace 2021-10-21 14:21:00 +00:00
Eric F Crist
f0129cfe62
Correct formatting issue in vars.example
Closes #370

Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
2020-03-31 09:01:07 -05:00
root
ce858f56c5 Added ED curve support 2020-01-19 07:54:24 +01:00
Eric F Crist
c4942d9abe
Merge branch 'kdc' of https://github.com/xavierba/easy-rsa into xavierba-kdc 2020-01-11 16:02:24 -06:00
Eric F Crist
7f727b791b
Default cert expire down to 825 days
* resolves #52

Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
2019-11-25 19:17:46 -06:00
a1346054
bd4135b453
Spelling 2019-11-24 15:25:37 +00:00
Xavier Bachelot
83962ca5c4 Add support for generating KDC server certificates 2019-08-02 17:52:24 +02:00
Eric F Crist
8374fcb4da
Adding support back in for incremental serials
Not enabled by default.  Should fix #177.

Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
2019-05-17 06:50:08 -05:00
Luiz Angelo Daros de Luca
6ecb6f489e
use temporary directory instead of individual files
Manually managing temp files into fixes variables (EASYRSA_TEMP_FILE_*),
can result in errors like in build_ca that reused EASYRSA_TEMP_FILE_3.
A temporary directory simplify the cleanup.

A configurable directory for temp files (var EASYRSA_TEMP_DIR) also
allows the user to define a different temporary directory. This is
important for devices using flash disks that have limited number of
writes.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2019-05-02 18:26:56 -03:00
Xavier Bachelot
ff87fb1812
Make cert renew grace period configurable (default: 30 days)
Signed-off-by: Xavier Bachelot <xavier@bachelot.org>
2019-01-28 23:42:01 +01:00
Luiz Angelo Daros de Luca
edf1e92a3f update EASYRSA_CERT_EXPIRE new default value
Improves 376c62f2b81e36db6f449ac7673013075b0c3ef1

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2018-10-04 18:08:43 -03:00
Eric F Crist
e8cd6c9807 Rename config to openssl-easyrsa.cnf
This clarifies the use of the file as specific to EasyRSA while also
closing the loop on the openssl version chase.  No reason to have a
configuration file that is specific to openssl version at this point.
If the need arises, we'll do so in a sane fashion.

Resolves #159

Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
2017-11-04 08:06:48 -05:00
Olav Reinert
d20d2b3c06 Update docs and examples to fit changes in 534f673 2017-07-27 08:27:27 +02:00
allo-
171834dd29 typo: Defualt 2014-09-14 17:50:14 +02:00
Josh Cepek
5758825baa Fix vars.example with proper path to extensions.temp
Related to issue #24. This does not yet resolve the vars_setup() logic
to assure unmodified variables use defaults rather than empty strings.
2014-07-27 07:19:49 -05:00
Josh Cepek
c86289ba17 Fix batch-mode handling with changes in e75ad75
The --batch CLI arg now takes no options and enables batch-mode when
present.

init-pki no longer takes a 'force' value which did the same as --batch.

Signed-off-by: Josh Cepek <josh.cepek@usa.net>
2013-12-11 11:29:51 -06:00
Josh Cepek
cb74c35eb3 Update to ECDSA support from commit 45c27e9
Add documentation & help output; add quoting; add error messages; put
the ecparams dir under PKI dir with env-var tunable.

Signed-off-by: Josh Cepek <josh.cepek@usa.net>
2013-11-24 23:37:27 -06:00
Josh Cepek
b0494ab243 Add initial 3.x codebase files
This is the initial re-write for the 3.x release series.

Signed-off-by: Josh Cepek <josh.cepek@usa.net>
2013-11-18 02:54:07 -06:00