summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | Deepcopy the HMAC factory function's resulting function.Isis Lovecruft2013-11-15
| |
* | Add bridgedb.parse.addr module for parsing IPs and ports.Isis Lovecruft2013-11-15
| | | | | | | | * MOVE class bridgedb.Bridges.PortList to bridgedb.parse.addr.
* | Add docstrings for Dist.IPBasedDistributor.Isis Lovecruft2013-11-15
| |
* | Fix a bug due to parantheses instead of square brackets.Isis Lovecruft2013-11-15
| |
* | Remove unnecessary config parameter coercion.Isis Lovecruft2013-11-15
| | | | | | | | | | FORCE_PORTS and FORCE_FLAGS are already set to lists. We don't need to coerce them if they weren't set anymore.
* | Handle KeyboardInterrupts in Main.startup() loop.Isis Lovecruft2013-11-15
| |
* | Give a warning if no emailDistributor was created.Isis Lovecruft2013-11-15
| |
* | Update startup.reload() docstring.Isis Lovecruft2013-11-15
| |
* | Also change cfg→config after def reload() in startup().Isis Lovecruft2013-11-15
| |
* | Start using bridgedb.persistent.State in bridgedb.Main.Isis Lovecruft2013-11-15
| |
* | Fix Main.reload() function to work with changed parameters.Isis Lovecruft2013-11-15
| |
* | Remove commented out code from bridgedb.persistent.Isis Lovecruft2013-11-15
| |
* | Remove a comment which is no longer helpful.Isis Lovecruft2013-11-15
| |
* | Change pidfile writer to use with(open()).Isis Lovecruft2013-11-15
| |
* | Change cfg→config in Main.startup() to avoid name conflict.Isis Lovecruft2013-11-15
| | | | | | | | | | Otherwise, the cfg variable in Main.startup().reload() would be overriding the parent namespace in potentially bad/buggy ways.
* | Add somewhat of a docstring to Main.startup().Isis Lovecruft2013-11-15
| |
* | Rewrite Main.loadConfig() to only log after the first run.Isis Lovecruft2013-11-15
| | | | | | | | | | | | | | | | | | | | | | | | There is a bit of a chicken-egg problem here, in that we need to parse our config file before we can configure logging, but we should start logging before changing settings, modifying the config file settings, and creating out persistent.State storage. To get around this, loadConfig() is now modified to only make calls to the logging module the second time the function is called (and all the times after). * MOVE all config/setting changing code from Main.startup() to Main.loadConfig() so that it is reparsed on SIGHUP correctly.
* | Move Main.Conf → persistent.Conf.Isis Lovecruft2013-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to store `Conf` config objects persistently, the Conf class must be accessible in the bridgedb.persistent module. However, the bridgedb.persistent module must be importable into bridgedb.Main in order to use it. This creates a circular import dependency. To fix it, I moved Main.Conf to persistent.Conf. Also, there were bugs in the Conf class which caused Conf instances to store __builtin__ classes. To fix this, I changed: for key, value in attrs.items(): if key.upper() == key: self.__dict__[key] = value to for key, value in attrs.items(): if key == key.upper(): if not key.startswith('__'): self.__dict__[key] = value * FIXES a bug in Conf class causing Python's __builtin__ classes to be reloaded into the global scope.
* | Add bridgedb.persistent module for storing persistent state.Isis Lovecruft2013-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ADD bridgedb.persistent.State class (along with load and save utilities) for securely storing serialized s-expressions representing Python objects and instances. * ADD 21 unittests for testing all new methods and classes in the bridgedb.persistent module. The State class can be used to track config file changes. For example, in bridgedb.Main.run(), several attributes on the config `Conf` object are changed, such as various filenames (to point to their absolute paths). When bridgedb is SIGHUPed, it will reread the config file and reapply all settings. However, this overwrites the variables which have been set in the code (for example, pointing back to non-absolute filepaths). The persistent.State class stores the `Conf` attributes as it's own attributes, and stores the `Conf` instance as State().config. This way, any changes to settings can be applied directly to the State instance, and if the `Conf` object changes on SIGHUP, BridgeDB will understand that a human (hopefully) has changed the file, rather than its own code. Thus, it is smarter about which settings to reapply.
* | Add encoding specification to bridgedb.Main module.Isis Lovecruft2013-11-15
| |
* | Keep a counter on total bridges inserted into a hashring.Isis Lovecruft2013-11-15
| |
* | Change asserts to validations in FilteredBridgeSplitter.insert().Isis Lovecruft2013-11-15
| | | | | | | | | | The asserts will be stripped if Python is run with -O2, thus they are not the best idea for production code.
* | Make loop varnames in FilteredBridgeSplitter.addRing() more descriptive.Isis Lovecruft2013-11-15
| |
* | Rename `ring` → `subring` in FilteredBridgeSplitter.addRing().Isis Lovecruft2013-11-15
| |
* | Sphinxify and improve docstring for FilteredBridgeSplitter.addRing().Isis Lovecruft2013-11-15
| |
* | Make log message in FixedBridgeSplitter.insert more understandable.Isis Lovecruft2013-11-15
| |
* | Add docstring to FilteredBridgeSplitter.insert().Isis Lovecruft2013-11-15
| |
* | Rename `index` and `ring` in FixedBridgeSplitter.dumpAssignments().Isis Lovecruft2013-11-15
| | | | | | | | | | Because `i` and `r` weren't immediately clear to me what they were referring to.
* | Add docstring to FixedBridgeSplitter.dumpAssignments().Isis Lovecruft2013-11-15
| |
* | PEP8 / make variable names clearer in FixedBridgeSplitter.__len__().Isis Lovecruft2013-11-15
| |
* | Add a docstring to bridgedb.Bridges.FixedBridgeSplitter.__len__().Isis Lovecruft2013-11-15
| |
* | Add a docstring to bridgedb.Bridges.FixedBridgeSplitter.clear().Isis Lovecruft2013-11-15
| |
* | Add a docstring to bridgedb.Bridges.BridgeRing.setName().Isis Lovecruft2013-11-15
| |
* | Start documenting sub-hashring ivars in Bridges.BridgeRing class.Isis Lovecruft2013-11-15
| |
* | PEP8ification of BridgeRingParameters.__init__().Isis Lovecruft2013-11-15
| |
* | Add a docstring to __init__ constructor for BridgeRingParameters.Isis Lovecruft2013-11-15
| |
* | Add a docstring to bridgedb.Bridges.BridgeRingParameters.Isis Lovecruft2013-11-15
| |
* | Fix old-style class bridgedb.Bridges.BridgeRingParameters.Isis Lovecruft2013-11-15
| |
* | Fix old-style class bridgedb.Bridges.BridgeHolder.Isis Lovecruft2013-11-15
| |
* | Remove two EOL whitespace characters in gen_bridge_descriptors.Isis Lovecruft2013-11-07
| |
* | Create the OR public ID key hash digest in gen_bridge_descriptors.Isis Lovecruft2013-11-07
| |
* | Return the OR server ID public RSA key from makeOnionKeys().Isis Lovecruft2013-11-07
| | | | | | | | | | | | The public key should be used in identity key hash digest creation, so we need to return `SIDPCert` from the makeOnionKeys() function in gen_bridge_descriptors, so that we can use it in makeDescriptors().
* | Update makeOnionKeys() docstring to include encoding specifications.Isis Lovecruft2013-11-15
| | | | | | | | | | | | | | * ADD excerpts, from tor-spec.txt and dir-spec.txt, pertaining to encodings and formats for keys/certs and hash digests, to gen_bridge_descriptor.makeOnionKeys() function docstring, for clarity, since the encodings currently used in this function are all kinds of wrong.
* | Fix OpenSSL cert timestamp bug in gen_bridge_descriptors.Isis Lovecruft2013-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSL only strictly takes a non-standardized format for timestamps which set the "Not Valid Before" and "Not Valid After" fields on an x509 certificate. It *doesn't* take timestamps in Seconds Since Epoch (as I previously had believed), but only with the strftime format "%Y%m%d%H%M%SZ" (yes, with a random capital-Z at the end). OpenSSL *also* doesn't consider the timestamp `0` to be the current time, contrary to its documentation. * FIXES a bug in gen_bridge_descriptors where all x509 certificates, and the signatures which their corresponding OpenSSL.crypto.PKeys created, were invalid due to crazy timestamps.
* | Fix missing newline after 'router-signature' in gen_bridge_descriptors.Isis Lovecruft2013-11-05
| | | | | | | | | | * FIX a bug where the newline after 'router-signature' in an OR extra-info descriptor was missing.
* | Fix bug in gen_bridge_descriptors which left spaces in an OR fingerprint.Isis Lovecruft2013-11-05
| | | | | | | | | | * FIX the first line of an OR extra-info document, the fingerprint was being written without the extra spaces removed.
* | Remove subCommand handling code from scripts/bridgedb.Isis Lovecruft2013-11-05
| | | | | | | | | | Also, minimize imports in scripts/bridgedb to precisely what is needed, so as not to risk errors caused by something being imported too early.
* | Flush after writing bridge assignments to file.Isis Lovecruft2013-11-05
| |
* | Update docstring for bridgedb.runner.generateDescriptors().Isis Lovecruft2013-11-05
| |
* | Add a 'clean' directive to the Makefile.Isis Lovecruft2013-11-05
| |