summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Properties.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Properties.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Properties.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Properties.py b/src/lib/Bcfg2/Server/Plugins/Properties.py
index 88f075311..8fed8ad96 100644
--- a/src/lib/Bcfg2/Server/Plugins/Properties.py
+++ b/src/lib/Bcfg2/Server/Plugins/Properties.py
@@ -6,7 +6,7 @@ import logging
import lxml.etree
import Bcfg2.Server.Plugin
try:
- from Bcfg2.Encryption import ssl_decrypt, EVPError
+ from Bcfg2.Encryption import ssl_decrypt, get_passphrases, EVPError
have_crypto = True
except ImportError:
have_crypto = False
@@ -15,15 +15,6 @@ logger = logging.getLogger(__name__)
SETUP = None
-def passphrases():
- section = "encryption"
- if SETUP.cfp.has_section(section):
- return dict([(o, SETUP.cfp.get(section, o))
- for o in SETUP.cfp.options(section)])
- else:
- return dict()
-
-
class PropertyFile(Bcfg2.Server.Plugin.StructFile):
"""Class for properties files."""
def write(self):
@@ -91,7 +82,7 @@ class PropertyFile(Bcfg2.Server.Plugin.StructFile):
def _decrypt(self, element):
if not element.text.strip():
return
- passes = passphrases()
+ passes = get_passphrases(SETUP)
try:
passphrase = passes[element.get("encrypted")]
try: