tls.cert_info: strip newlines/spaces from extensions

This commit is contained in:
Ronald van Zantvoort 2018-08-15 12:49:45 +02:00
parent d522d01786
commit 3ce2c3e2e4
No known key found for this signature in database
GPG Key ID: D3DE53B7EFF75061

View File

@ -1642,7 +1642,7 @@ def cert_info(cert, digest='sha256'):
try:
ext = cert.get_extension(i)
key = salt.utils.stringutils.to_unicode(ext.get_short_name())
ret['extensions'][key] = str(ext)
ret['extensions'][key] = str(ext).strip()
except AttributeError:
continue