aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stokes <adam.stokes@ubuntu.com>2013-10-30 23:39:30 -0400
committerAdam Stokes <adam.stokes@ubuntu.com>2013-10-30 23:39:30 -0400
commit8b613636ac01572101ec9bb806d5c09cb65d894a (patch)
tree5bb1f0b53fbae9c85240763e5890b6b0930a4b01
parent62cfa3cf72c1a006294bf59efb252fde6081ffc8 (diff)
downloadsos-8b613636ac01572101ec9bb806d5c09cb65d894a.tar.gz
Scrub credentials from openssl plugin
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r--sos/plugins/openssl.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/sos/plugins/openssl.py b/sos/plugins/openssl.py
index 2ad44a2d..c73181be 100644
--- a/sos/plugins/openssl.py
+++ b/sos/plugins/openssl.py
@@ -23,6 +23,17 @@ class OpenSSL(Plugin):
plugin_name = "openssl"
packages = ('openssl',)
+ def postproc(self):
+ protect_keys = ["input_password",
+ "output_password",
+ "challengePassword"]
+
+ regexp = r"(?m)^(\s*#?\s*(%s).*=)(.*)" % "|".join(protect_keys)
+
+ self.do_file_sub('/etc/ssl/openssl.cnf',
+ regexp,
+ r"\1 ******")
+
class RedHatOpenSSL(OpenSSL, RedHatPlugin):
"""openssl related information for Red Hat distributions
"""