diff options
-rw-r--r-- | myrpki/myirbe.py | 2 | ||||
-rw-r--r-- | rpkid/irdbd.py | 2 | ||||
-rw-r--r-- | rpkid/pubd.py | 2 | ||||
-rw-r--r-- | rpkid/rootd.py | 2 | ||||
-rw-r--r-- | rpkid/rpki/config.py | 21 | ||||
-rw-r--r-- | rpkid/rpkid.py | 2 |
6 files changed, 21 insertions, 10 deletions
diff --git a/myrpki/myirbe.py b/myrpki/myirbe.py index 27582295..ad54c9aa 100644 --- a/myrpki/myirbe.py +++ b/myrpki/myirbe.py @@ -134,7 +134,7 @@ for o, a in opts: cfg = rpki.config.parser(cfg_file, "myirbe") -cfg.set_debugging_flags() +cfg.set_global_flags() myrpki.openssl = cfg.get("openssl", "openssl", "myrpki") diff --git a/rpkid/irdbd.py b/rpkid/irdbd.py index 733178e8..ac32a907 100644 --- a/rpkid/irdbd.py +++ b/rpkid/irdbd.py @@ -189,7 +189,7 @@ startup_msg = cfg.get("startup-message", "") if startup_msg: rpki.log.info(startup_msg) -cfg.set_debugging_flags() +cfg.set_global_flags() db = MySQLdb.connect(user = cfg.get("sql-username"), db = cfg.get("sql-database"), diff --git a/rpkid/pubd.py b/rpkid/pubd.py index ceb6bac7..db98faeb 100644 --- a/rpkid/pubd.py +++ b/rpkid/pubd.py @@ -176,7 +176,7 @@ def main(): if profile: rpki.log.info("Running in profile mode with output to %s" % profile) - cfg.set_debugging_flags() + cfg.set_global_flags() pctx = pubd_context(cfg) diff --git a/rpkid/rootd.py b/rpkid/rootd.py index a15a497a..a87c0168 100644 --- a/rpkid/rootd.py +++ b/rpkid/rootd.py @@ -283,7 +283,7 @@ rpki.log.init("rootd") cfg = rpki.config.parser(cfg_file, "rootd") -cfg.set_debugging_flags() +cfg.set_global_flags() bpki_ta = rpki.x509.X509(Auto_file = cfg.get("bpki-ta")) rootd_bpki_key = rpki.x509.RSA( Auto_file = cfg.get("rootd-bpki-key")) diff --git a/rpkid/rpki/config.py b/rpkid/rpki/config.py index ce0f5b8e..8b337463 100644 --- a/rpkid/rpki/config.py +++ b/rpkid/rpki/config.py @@ -126,12 +126,13 @@ class parser(object): """ return self._get_wrapper(self.cfg.getint, section, option, default) - def set_debugging_flags(self): + def set_global_flags(self): """ - Consolidated control for all the little debugging controls - scattered through the libraries. This doesn't really fit - anywhere, it's a method of the parser class because it operates on - the parser object and thus fits here less badly than anywhere else. + Consolidated control for all the little global control flags + scattered through the libraries. This isn't a particularly good + place for this function to live, but it has to live somewhere and + making it a method of the config parser from which it gets all of + its data is less silly than the available alternatives. """ import rpki.https, rpki.x509, rpki.sql, rpki.async @@ -147,6 +148,16 @@ class parser(object): pass try: + rpki.https.want_persistent_client = self.getboolean("want_persistent_client") + except ConfigParser.NoOptionError: + pass + + try: + rpki.https.want_persistent_server = self.getboolean("want_persistent_server") + except ConfigParser.NoOptionError: + pass + + try: rpki.x509.CMS_object.debug_cms_certs = self.getboolean("debug_cms_certs") except ConfigParser.NoOptionError: pass diff --git a/rpkid/rpkid.py b/rpkid/rpkid.py index d16d33f9..05e40e39 100644 --- a/rpkid/rpkid.py +++ b/rpkid/rpkid.py @@ -76,7 +76,7 @@ def main(): if profile: rpki.log.info("Running in profile mode with output to %s" % profile) - cfg.set_debugging_flags() + cfg.set_global_flags() gctx = rpki.rpki_engine.rpkid_context(cfg) |