Permalink
Browse files

Normalize EOL whitespace and add a target to do so for us in the future.

  • Loading branch information...
1 parent c85e9b6 commit 6552b145aad989d0dfb750b6ad16d3ef6e9128db @nmathewson nmathewson committed Jan 5, 2003
View
@@ -25,7 +25,7 @@ CODING STYLE:
- Also see PEP-0257 for documentation; we're not there yet, but it's
happening. (http://www.python.org/peps/pep-0257.html)
- Magic strings:
- "XXXX" indicates a defect in the code.
+ "XXXX" indicates a defect in the code.
"FFFF" indicates a missing feature.
"????" indicates an untested or iffy block.
"DOCDOC" indicates missing documentation.
@@ -46,13 +46,13 @@ PORTABILITY NOTES:
support OAEP, but we've already got an implementation of that
in Python.
- So for now, it's OpenSSL. I'll accept any patches that make us
+ So for now, it's OpenSSL. I'll accept any patches that make us
run under gnutls/libgcrypt as well, but I think in the long term
we should migrate to libnss entirely.
PORTING TO NON-LINUX PLATFORMS:
- - If you need to run on a system without an acceptable /dev/*random,
- you'll need to write an acceptable fallback for mixminion.Crypto.trng()
+ - If you need to run on a system without an acceptable /dev/*random,
+ you'll need to write an acceptable fallback for mixminion.Crypto.trng()
to use.
CAVEATS:
@@ -82,7 +82,7 @@ FINDING YOUR WAY AROUND THE CODE.
I V
I ... and delivered to other Mixminion servers via MMTPServer
V
- ---Others are queued and delivered by other exit methods,
+ ---Others are queued and delivered by other exit methods,
implemented and selected by ModuleManager.
CONTRIBUTING PATCHES:
View
@@ -1,5 +1,5 @@
# Copyright 2002 Nick Mathewson. See LICENSE for licensing information.
-# $Id: Makefile,v 1.26 2003/01/05 04:16:49 nickm Exp $
+# $Id: Makefile,v 1.27 2003/01/05 06:49:24 nickm Exp $
# Okay, we'll start with a little make magic. The goal is to define the
# make variable '$(FINDPYTHON)' as a chunk of shell script that sets
@@ -33,7 +33,7 @@ FINDPYTHON = \
echo "WARNING: $$PYTHON doesn't seem to be version 2 or later."; \
echo ' If this fails, please set the PYTHON environment variable.';\
fi \
- fi
+ fi
#
# Here are the real make targets.
@@ -182,6 +182,11 @@ xxxx002:
find lib src \( -name '*.py' -or -name '*.[ch]' \) -print0 \
| xargs -0 grep 'XXXX00[12]\|FFFF00[12]\|DOCDOC\|????00[12]'
+eolspace:
+ perl -i.bak -pe 's/\s*\n$$/\n/;' ACKS HACKING LICENSE MANIFEST.in \
+ Makefile README TODO pycheckrc setup.py src/*.[ch] \
+ lib/mixminion/*.py lib/mixminion/*/*.py
+
longlines:
find lib src \( -name '*.py' -or -name '*.[ch]' \) -print0 \
| xargs -0 grep '^................................................................................'
View
@@ -15,7 +15,7 @@ WARNING! Don't use this release if you require strong anonymity. It has
known deficiencies, including some that make it possible for an adversary
to trace your message through the system.
-IN THIS VERSION:
+IN THIS VERSION:
- You can run a rudimentary server that can deliver to other Mixminion
servers, that can use Mixmaster to deliver to any external address,
or that sends SMTP directly to a preconfigured set of addresses.
@@ -65,7 +65,7 @@ HOW TO BUILD, TEST, AND INSTALL MIXMINION: The verbose version.
correctly on your system. Go read contrib/openssl/INSTALL, and make
OpenSSL build.
- 5) Run "make". If you get any errors, please report them to
+ 5) Run "make". If you get any errors, please report them to
<nickm@freehaven.net>.
6) Run "make test" to run Mixminion's unit tests. If you get any errors,
@@ -83,9 +83,9 @@ HOW TO BUILD, TEST, AND INSTALL MIXMINION: The verbose version.
HOW TO SEND AN EMAIL MESSAGE VIA MIXMINION:
[First time only. These steps won't be necessary once v0.0.2 is out.]
- 1) Download the latest directory from
+ 1) Download the latest directory from
http://www.mixminion.net/miniondir.tar.gz
- 2) Unpack it into your homedir; it will create the directory
+ 2) Unpack it into your homedir; it will create the directory
"~/.mixminion/servers/".
[All subsequent times. The first two steps won't be necessary once v0.0.2 is
@@ -95,7 +95,7 @@ HOW TO SEND AN EMAIL MESSAGE VIA MIXMINION:
separated list of servers. The last server in the second part of the
path must support smtp. All intermediate servers must support 'relay'.
3) Run (type this as a single line):
- mixminion client -t <email address>
+ mixminion client -t <email address>
--path1=<first part of your path>
--path2=<second part of your path>
-i <filename to send, or - to read from stdin>.
@@ -112,12 +112,12 @@ HOW TO RUN YOUR OWN MIXMINION SERVER:
"mixminion server -f <path to mixminiond.conf>"
4) {This step will change in future version once directories are supported.}
- For clients to use your server, they'll need a copy of your server
+ For clients to use your server, they'll need a copy of your server
descriptor, which should be stored in $SERVER_HOME/keys/key_*/ServerDesc.
For example, if your mixminiond.conf contains the following line:
Homedir: /home/mixminion/spool
-
- Then your first server descriptor will be stored in
+
+ Then your first server descriptor will be stored in
"/home/mixminion/spool/keys/key_0001/ServerDesc".
Clients should place a copy of this file, named whatever you like,
View
@@ -19,7 +19,7 @@ For 0.0.2: [The 'desireable features' release. This should contain
o Tests for SMTP module
o Actually try it out.
D Interface for reply blocks
- . Minimal directory support
+ o Minimal directory support
o Make everything resistant to newline corruption
o Signatures are independent of newline style
o Config files are read independent of newline style.
@@ -39,11 +39,12 @@ For 0.0.2: [The 'desireable features' release. This should contain
o Tests for CLI support
o Test CLI
o Server-side directory generation (not automated;
- still no automatic rotation.)
+ still no automatic rotation.)
o Backend
o CLI
o Tests for backend
o Test CLI
+ - Retest CLI one last time before shipping
o Path selection
o Implement
o Test backend
@@ -77,8 +78,9 @@ For 0.0.2: [The 'desireable features' release. This should contain
o Balance =-signs on "==ANONYMOUS MESSAGE BEGINS"
. Acknowledgments
o Triage XXXX'S for 002.
- - Fix all XXXX002's.
+ . Fix all XXXX002's.
. Document everything
+ - Clean whitespace
o Make __version__ get set automatically, from only one place.
- Write a "whatsnew" as a part of the README.
@@ -1,5 +1,5 @@
# Copyright 2002 Nick Mathewson. See LICENSE for licensing information.
-# $Id: BuildMessage.py,v 1.30 2003/01/05 01:27:12 nickm Exp $
+# $Id: BuildMessage.py,v 1.31 2003/01/05 06:49:25 nickm Exp $
"""mixminion.BuildMessage
@@ -33,7 +33,7 @@ def buildForwardMessage(payload, exitType, exitInfo, path1, path2,
Neither path1 nor path2 may be empty. If one is, MixError is raised.
"""
- if paddingPRNG is None:
+ if paddingPRNG is None:
paddingPRNG = Crypto.getCommonPRNG()
if not path1:
raise MixError("First leg of path is empty")
@@ -68,7 +68,7 @@ def buildEncryptedForwardMessage(payload, exitType, exitInfo, path1, path2,
paddingPRNG: random number generator used to generate padding.
If None, a new PRNG is initialized.
"""
- if paddingPRNG is None:
+ if paddingPRNG is None:
paddingPRNG = Crypto.getCommonPRNG()
if secretRNG is None: secretRNG = paddingPRNG
@@ -202,7 +202,7 @@ def buildReplyBlock(path, exitType, exitInfo, userKey,
block that stored its secrets on disk, and used an arbitrary tag to
determine
"""
- if secretRNG is None:
+ if secretRNG is None:
secretRNG = Crypto.getCommonPRNG()
# We need to pick the seed to generate our keys. To make the decoding
@@ -561,7 +561,7 @@ def _encodePayload(payload, overhead, paddingPRNG):
origLength = len(payload)
payload = compressData(payload)
length = len(payload)
-
+
if length > 1024 and length*20 <= origLength:
LOG.warn("Message is very compressible and will look like a zlib bomb")
@@ -661,11 +661,11 @@ def uncompressData(payload, maxLength=None):
raise CompressedDataTooLong()
except zlibutil.DecompressError, e:
raise ParseError("Error in compressed data: %s"%e)
-
+
try:
# We can't just call zlib.decompress(payload), since we may
# want to limit the output size.
-
+
zobj = zlib.decompressobj(zlib.MAX_WBITS)
# Decompress the payload.
if maxLength is None:
@@ -676,7 +676,7 @@ def uncompressData(payload, maxLength=None):
d = zobj.decompress(payload, maxLength)
if zobj.unconsumed_tail:
raise CompressedDataTooLong()
-
+
# Get any leftovers, which shouldn't exist.
nil = zobj.flush()
if nil != '':
Oops, something went wrong.

0 comments on commit 6552b14

Please sign in to comment.