summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Encryption.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Encryption.py')
-rwxr-xr-xsrc/lib/Bcfg2/Encryption.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Encryption.py b/src/lib/Bcfg2/Encryption.py
index 5eb7ffe8e..eb2841bb5 100755
--- a/src/lib/Bcfg2/Encryption.py
+++ b/src/lib/Bcfg2/Encryption.py
@@ -33,6 +33,8 @@ Rand.rand_seed(os.urandom(1024))
def _cipher_filter(cipher, instr):
+ """ M2Crypto reads and writes file-like objects, so this uses
+ StringIO to pass data through it """
inbuf = StringIO(instr)
outbuf = StringIO()
while 1:
@@ -161,6 +163,7 @@ def get_algorithm(setup):
return setup.cfp.get("encryption", "algorithm",
default=ALGORITHM).lower().replace("-", "_")
+
def get_passphrases(setup):
""" Get all candidate encryption passphrases from the config file.