From dc0f3151b15d8d9747a9644777a1309dac7a7fc3 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 29 Mar 2017 21:49:50 +0530 Subject: [PATCH] openvpn: Set unique subject property on each cert generation Just to be sure of the ability to generate the certificate even on modifications. --- actions/openvpn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/openvpn b/actions/openvpn index e29ff8bbf..f347f317b 100755 --- a/actions/openvpn +++ b/actions/openvpn @@ -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')