mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #39554 from DSRCorporation/bugs/ssl_bool
Cosmetic: support bool value for 'ssl' config option.
This commit is contained in:
commit
56fe2f198e
1 changed files with 6 additions and 2 deletions
|
@ -932,7 +932,7 @@ VALID_OPTS = {
|
|||
# http://docs.python.org/2/library/ssl.html#ssl.wrap_socket
|
||||
# Note: to set enum arguments values like `cert_reqs` and `ssl_version` use constant names
|
||||
# without ssl module prefix: `CERT_REQUIRED` or `PROTOCOL_SSLv23`.
|
||||
'ssl': (dict, type(None)),
|
||||
'ssl': (dict, bool, type(None)),
|
||||
|
||||
# django auth
|
||||
'django_auth_path': str,
|
||||
|
@ -3106,7 +3106,11 @@ def _update_ssl_config(opts):
|
|||
'''
|
||||
Resolves string names to integer constant in ssl configuration.
|
||||
'''
|
||||
if opts['ssl'] is None:
|
||||
if opts['ssl'] in (None, False):
|
||||
opts['ssl'] = None
|
||||
return
|
||||
if opts['ssl'] is True:
|
||||
opts['ssl'] = {}
|
||||
return
|
||||
import ssl
|
||||
for key, prefix in (('cert_reqs', 'CERT_'),
|
||||
|
|
Loading…
Add table
Reference in a new issue