mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
openvpn: Set unique subject property on each cert generation
Just to be sure of the ability to generate the certificate even on modifications.
This commit is contained in:
parent
04cadbc82f
commit
dc0f3151b1
@ -147,7 +147,6 @@ def _create_certificates():
|
||||
except FileExistsError:
|
||||
pass
|
||||
|
||||
set_unique_subject('no') # Set unique subject in ATTR_FILE to no
|
||||
subprocess.check_call(['/usr/share/easy-rsa/clean-all'], **COMMON_ARGS)
|
||||
subprocess.check_call(['/usr/share/easy-rsa/pkitool', '--initca'],
|
||||
**COMMON_ARGS)
|
||||
@ -169,6 +168,7 @@ def subcommand_get_profile(arguments):
|
||||
|
||||
if not _is_non_empty_file(user_certificate) or \
|
||||
not _is_non_empty_file(user_key):
|
||||
set_unique_subject('no') # Set unique subject in attribute file to no
|
||||
subprocess.check_call(['/usr/share/easy-rsa/pkitool', username],
|
||||
**COMMON_ARGS)
|
||||
|
||||
@ -204,7 +204,7 @@ def _is_non_empty_file(filepath):
|
||||
def load_augeas():
|
||||
"""Initialize Augeas."""
|
||||
aug = augeas.Augeas(flags=augeas.Augeas.NO_LOAD +
|
||||
augeas.Augeas.NO_MODL_AUTOLOAD)
|
||||
augeas.Augeas.NO_MODL_AUTOLOAD)
|
||||
|
||||
# shell-script config file lens
|
||||
aug.set('/augeas/load/Simplevars/lens', 'Simplevars.lns')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user