diff options
Diffstat (limited to 'src/lib/Bcfg2/Server/Encryption.py')
-rwxr-xr-x | src/lib/Bcfg2/Server/Encryption.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Encryption.py b/src/lib/Bcfg2/Server/Encryption.py index c931ed2a7..b46337eb0 100755 --- a/src/lib/Bcfg2/Server/Encryption.py +++ b/src/lib/Bcfg2/Server/Encryption.py @@ -30,6 +30,9 @@ CFG_SECTION = "encryption" #: The config option used to store the algorithm CFG_ALGORITHM = "algorithm" +#: The config option used to store the decryption strictness +CFG_DECRYPT = "decrypt" + #: Default cipher algorithm. To get a full list of valid algorithms, #: you can run:: #: @@ -40,6 +43,7 @@ ALGORITHM = Bcfg2.Options.get_option_parser().cfp.get( # pylint: disable=E1103 CFG_ALGORITHM, default="aes_256_cbc").lower().replace("-", "_") + Rand.rand_seed(os.urandom(1024)) @@ -165,7 +169,7 @@ def get_passphrases(): if setup.cfp.has_section(CFG_SECTION): return dict([(o, setup.cfp.get(CFG_SECTION, o)) for o in setup.cfp.options(CFG_SECTION) - if o != CFG_ALGORITHM]) + if o not in [CFG_ALGORITHM, CFG_DECRYPT]]) else: return dict() |