Convert to string before sending via 'publish'.

Otherwise the publish call with receive a "b''" string, which can not be used
in the functions.
This commit is contained in:
Florian Bergmann 2018-09-04 16:44:41 +02:00 committed by Ch3LL
parent 651c5512d9
commit deb013433d
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73

View file

@ -1374,9 +1374,9 @@ def create_certificate(
pem_type='CERTIFICATE REQUEST').replace('\n', '')
if 'public_key' in kwargs:
# Strip newlines to make passing through as cli functions easier
kwargs['public_key'] = get_public_key(
kwargs['public_key'] = salt.utils.stringutils.to_str(get_public_key(
kwargs['public_key'],
passphrase=kwargs['public_key_passphrase']).replace('\n', '')
passphrase=kwargs['public_key_passphrase'])).replace('\n', '')
# Remove system entries in kwargs
# Including listen_in and preqreuired because they are not included