Skip to content

Commit

Permalink
Fix strictuserdn -> strictusercn option (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
SherZCHR authored Dec 19, 2023
1 parent 1334ca5 commit b069235
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions plugins/module_utils/openvpn_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
crl=dict(required=False, type='str'),
cert=dict(required=False, type='str'),
cert_depth=dict(default=1, required=False, type='int'),
strictuserdn=dict(default=False, required=False, type='bool'),
strictusercn=dict(default=False, required=False, type='bool'),
shared_key=dict(required=False, type='str', no_log=True),
dh_length=dict(default=2048, required=False, type='int'),
ecdh_curve=dict(default='none', required=False, choices=['none', 'prime256v1', 'secp384r1', 'secp521r1']),
Expand Down Expand Up @@ -107,7 +107,7 @@ def _params_to_obj(self):
if self.params['state'] == 'present':
obj['custom_options'] = self.params['custom_options']
self._get_ansible_param_bool(obj, 'disable')
self._get_ansible_param_bool(obj, 'strictuserdn')
self._get_ansible_param_bool(obj, 'strictusercn')
obj['mode'] = self.params['mode']
obj['dev_mode'] = self.params['dev_mode']
obj['interface'] = self.params['interface']
Expand Down
6 changes: 3 additions & 3 deletions plugins/module_utils/openvpn_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
crl=dict(required=False, type='str'),
cert=dict(required=False, type='str'),
cert_depth=dict(default=1, required=False, type='int'),
strictuserdn=dict(default=False, required=False, type='bool'),
strictusercn=dict(default=False, required=False, type='bool'),
shared_key=dict(required=False, type='str', no_log=True),
dh_length=dict(default=2048, required=False, type='int'),
ecdh_curve=dict(default='none', required=False, choices=['none', 'prime256v1', 'secp384r1', 'secp521r1']),
Expand Down Expand Up @@ -119,7 +119,7 @@ def _params_to_obj(self):
if self.params['state'] == 'present':
obj['custom_options'] = self.params['custom_options']
self._get_ansible_param_bool(obj, 'disable')
self._get_ansible_param_bool(obj, 'strictuserdn')
self._get_ansible_param_bool(obj, 'strictusercn')
obj['mode'] = self.params['mode']
obj['dev_mode'] = self.params['dev_mode']
obj['interface'] = self.params['interface']
Expand Down Expand Up @@ -275,7 +275,7 @@ def _find_last_openvpn_idx(self):
def _get_params_to_remove(self):
""" returns the list of params to remove if they are not set """
params_to_remove = []
for param in ['disable', 'strictuserdn', 'push_register_dns']:
for param in ['disable', 'strictusercn', 'push_register_dns']:
if not self.params[param]:
params_to_remove.append(param)

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/pfsense_openvpn_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
required: false
default: 1
type: int
strictuserdn:
strictusercn:
description: Enforce a match between the common name of the client certificate and the username given at login.
default: false
type: bool
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/pfsense_openvpn_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
required: false
default: 1
type: int
strictuserdn:
strictusercn:
description: Enforce a match between the common name of the client certificate and the username given at login.
default: false
type: bool
Expand Down

0 comments on commit b069235

Please sign in to comment.