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:
Sunil Mohan Adapa 2017-03-29 21:49:50 +05:30
parent 04cadbc82f
commit dc0f3151b1
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -147,7 +147,6 @@ def _create_certificates():
except FileExistsError: except FileExistsError:
pass 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/clean-all'], **COMMON_ARGS)
subprocess.check_call(['/usr/share/easy-rsa/pkitool', '--initca'], subprocess.check_call(['/usr/share/easy-rsa/pkitool', '--initca'],
**COMMON_ARGS) **COMMON_ARGS)
@ -169,6 +168,7 @@ def subcommand_get_profile(arguments):
if not _is_non_empty_file(user_certificate) or \ if not _is_non_empty_file(user_certificate) or \
not _is_non_empty_file(user_key): 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], subprocess.check_call(['/usr/share/easy-rsa/pkitool', username],
**COMMON_ARGS) **COMMON_ARGS)