Merge pull request #27727 from rallytime/merge-27719

Merge #27719 w/pylint fix
This commit is contained in:
Nicole Thomas 2015-10-06 15:13:37 -06:00
commit d3f2dfe835
2 changed files with 14 additions and 1 deletions

View file

@ -63,10 +63,13 @@ CERT_DEFAULTS = {'days_valid': 365, 'version': 3, 'serial_bits': 64, 'algorithm'
def __virtual__():
'''
only load this module if m2crypto is available
'''
if HAS_M2:
return __virtualname__
else:
return False
return (False, 'Could not load x509 module, m2crypto unavailable')
class _Ctx(ctypes.Structure):

View file

@ -169,6 +169,16 @@ import salt.utils
import salt.ext.six as six
def __virtual__():
'''
only load this module if the corresponding execution module is loaded
'''
if 'x509.get_pem_entry' in __salt__:
return 'x509'
else:
return (False, 'Could not load x509 state: m2crypto unavailable')
def _revoked_to_list(revs):
'''
Turn the mess of OrderedDicts and Lists into a list of dicts for