Repository: freedomofpress/securedrop

Issue:
change internal naming to securedrop
change internal references in code to securedrop



Discussion:
You think this is important for 0.1? The only reason I'm hesitant is because we don't have tests yet, so I would hate to break everything at the last minute. But if it would be easy to do without trouble let's go ahead and do it.

No, I don't think it's necessary for 0.1, given the amount of references
to deaddrop.  I've added this to the 0.2 milestone.

On Sat, 12 Oct 2013 15:11:57 -0700, Micah Lee wrote:

> You think this is important for 0.1? The only reason I'm hesitant is because we don't have tests yet, so I would hate to break everything at the last minute. But if it would be easy to do without trouble let's go ahead and do it.
> 
> ---
> 
> Reply to this email directly or view it on GitHub:
> https://github.com/freedomofpress/securedrop/issues/64#issuecomment-26207152


Resolving patch:
diff --git a/install_files/journalist.config.py b/install_files/journalist.config.py
--- a/install_files/journalist.config.py
+++ b/install_files/journalist.config.py
@@ -34,7 +34,7 @@ class TestingConfig(BaseConfig):
 
 if os.environ.get('SECUREDROP_ENV') == 'test':
     FlaskConfig = TestingConfig
-    TEST_DIR='/tmp/deaddrop_test'
+    TEST_DIR='/tmp/securedrop_test'
     STORE_DIR=os.path.join(TEST_DIR, 'store')
     GPG_KEY_DIR=os.path.join(TEST_DIR, 'keys')
     # test_journalist_key.pub
diff --git a/install_files/source.config.py b/install_files/source.config.py
--- a/install_files/source.config.py
+++ b/install_files/source.config.py
@@ -33,7 +33,7 @@ class TestingConfig(BaseConfig):
 
 if os.environ.get('SECUREDROP_ENV') == 'test':
     FlaskConfig = TestingConfig
-    TEST_DIR='/tmp/deaddrop_test'
+    TEST_DIR='/tmp/securedrop_test'
     STORE_DIR=os.path.join(TEST_DIR, 'store')
     GPG_KEY_DIR=os.path.join(TEST_DIR, 'keys')
     # test_journalist_key.pub
diff --git a/securedrop/crypto_util.py b/securedrop/crypto_util.py
--- a/securedrop/crypto_util.py
+++ b/securedrop/crypto_util.py
@@ -96,14 +96,14 @@ def genkeypair(name, secret):
     return gpg.gen_key(gpg.gen_key_input(
         key_type=GPG_KEY_TYPE, key_length=GPG_KEY_LENGTH,
         passphrase=secret,
-        name_email="%s@deaddrop.example.com" % name
+        name_email=name
     ))
 
 
 def getkey(name):
     for key in gpg.list_keys():
         for uid in key['uids']:
-            if ' <%s@' % name in uid:
+            if name in uid:
                 return key['fingerprint']
     return None
 


Test patch:
diff --git a/securedrop/test_journalist_key.pub b/securedrop/test_journalist_key.pub
--- a/securedrop/test_journalist_key.pub
+++ b/securedrop/test_journalist_key.pub
@@ -12,41 +12,41 @@ ak+Y8aolHDt6a785eF0AaAtgbPX4THMum/CNMksHO0PBBqxR+C9z7WSHXFHvv+8B
 CyIBiMZSK/j8PMJT1X5tgpL1NXImNdVIPV2Fy+W7PkNfG2FL/FQIUnK6ntukLW/7
 hV6VHcx52mMn1pVUc6v80LEb4BMDz41vlj9R8YVv8hycPtnN0QL5gIME1n7jbKJf
 yfWxkvBXMINDgHK/RysRMP6FXA6Mw65BGNIuO0Il0FTy12HuKI/coEsG2QARAQAB
-tDZEZWFkZHJvcCBUZXN0IChETyBOT1QgVVNFKSA8dGVzdEBkZWFkZHJvcC5leGFt
-cGxlLmNvbT6JAjgEEwECACIFAlJZi2ACGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4B
-AheAAAoJEMxA7xIoJxRBMlkP/18HHiAJz2SHxYrzmuw/dsrQVUMvqN8xeWg4ljfq
-nF1O3OkpS19LRqa0oICQC0AvwrjAxP7CESSHZwa1AD7mqTMOJEa/uJNnbBfWuBRq
-xlX8n4JtFZGHvc747iHrv4fF/Mc0dCSnJU4XqPcnOMrUHIddi0Up1Wv5rKM0idDc
-ApPpAuunz/ZvF8s8UXYNkcRxKNeQA9qYCMcI/FDnB2hdbXFP4FwOBWt9NUyvqbrr
-URd40cBpIcKhWgETArwbFy7SrGvL0KHyLINKJxQCTS4yUeyG5r/iHZ/WKoGW46jF
-iOUx3eAzsBvJs/6BGkls4+jEQAdAhqqcqlULWbzHpyoUBl7AIEiJ1AOC4v653Qf+
-GJEMhuLogXabmlUUoyWD75iZXp21IjcP2Fp2KjufHpac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h
+h4IwOQ+kvj0qMww8fASI9DJExXUYb3xDSCmOkJPhu1/Drr3gdFBha4/jAz7jBWls
+Vr2RLJzilf8Mi9j8WpHIfP+WXtwWz3+iYPS0SPoB7g9DA0+Ei760pJJf73AEjD+f
+FwARAQABiQIfBBgBAgAJBQJSWYtgAhsMAAoJEMxA7xIoJxRBp/cP/3lJx9z5yzZA
+6UvLQR6pK+V1iy2hvZ+S+EwYRCiTgYTXekHzLXWwjWGfUYDTHMeaS9O9BMRMGOU3
+inyb47GZSoQ0N0bRVTzrY6/0ifhUSJ00MemOodI1bz4pAMk3uR8iWyhlaGn7JAIA
+KmCm+K0qkeJd61S9iyrx7s9QmaNPnupm5pc+bpOAkbKyq7sEFpWM5Qx82n1tVMtn
+IW2OoRPbz80JkkQB2pl6SjskXqZ89jcFWGI6IChYENKc65xafDt4uFuHU+5j4j2f
+4ySYSwfoWC97MOgJLqA/WimxeeNCYFhykUDWrL5mKBTgMXgH/sYk3GDo7fssaYbK
+n1xbbX4GXQl3+ru4zT6/F7CxZErjLb+evShyf4itM+5AdbKRiRzoraqKblBa4TfJ
+BSqHisdcxdZeBe19+jyY6a8ZMcGhrQeksiKxTRh7ylAk7CLVgLEIHLxXzHoZ0oAF
+z2ulG+zH9KS9Pe8MQxHCrlyfoQElQuJoYbrYBOu28itvGPgz6+5xgvZROvPoqIkI
+k8DYt9lJqUFBeZuFJd5W1TuHKLxueVYvSKeG+e3TjOYdJFvDZInM4cNWr8N92mYS
+iphljiHAKVTQeIf1ma07QUH/ul3YC+g07F+BLonIIXA6uQVebv5iLxTgOzIQwHTJ
+Vu4MPiQNn1h4dk1RonfV/aJ+de1+qjA8
+=XVz8
 -----END PGP PUBLIC KEY BLOCK-----
diff --git a/securedrop/test_journalist_key.sec b/securedrop/test_journalist_key.sec
--- a/securedrop/test_journalist_key.sec
+++ b/securedrop/test_journalist_key.sec
@@ -38,20 +38,20 @@ LRSDPf//qAsXrN8YkrOm7BsfRp9tMzgCEpkCgDj3JZD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