Commits

A Kruger committed d40f976 Merge

Merge

Comments (0)

Files changed (3)

Automation/psi_ops.py

                     psi_ops_crypto_tools.generate_key_pair(
                         REMOTE_SERVER_SIGNING_KEY_PAIR_PASSWORD))
 
+        # This may be serialized/deserialized into a unicode string, but M2Crypto won't accept that.
+        # The key pair should only contain ascii anyways, so encoding to ascii should be safe.
+        self.__remote_server_list_signing_key_pair.pem_key_pair = \
+            self.__remote_server_list_signing_key_pair.pem_key_pair.encode('ascii', 'ignore')
+        return self.__remote_server_list_signing_key_pair
+
     def create_feedback_encryption_key_pair(self):
         '''
         Generate a feedback encryption key pair and wrapping password.

EmailResponder/FeedbackDecryptor/maildecryptor.conf

 description "Psiphon maildecryptor daemon"
 author "Psiphon Inc."
 
-env MAILDECRYPTOR_DIR="/opt/psiphon/maildecryptor"
+env MAILDECRYPTOR_DIR=fill-in-with-path-to-source
 
 # Start manually.
 start on (local-filesystems and net-device-up IFACE!=lo)

EmailResponder/FeedbackDecryptor/maildecryptor_install.sh

 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-MAILDECRYPTOR_DIR="/opt/psiphon/maildecryptor"
 MAILDECRYPTOR_USER="maildecryptor"
 
+if [ ! -f ./maildecryptor.conf ]; then
+  echo "This script must be run from the source directory."
+  exit 1
+fi
+
 echo "You must already have created the user $MAILDECRYPTOR_USER, otherwise this script will fail. See the README for details."
 echo ""
 
-sudo cp maildecryptor.conf /etc/init
+sed "s|fill-in-with-path-to-source|\"`pwd`\"|" maildecryptor.conf > maildecryptor.conf.configured
 
-sudo mkdir -p $MAILDECRYPTOR_DIR
-sudo cp * $MAILDECRYPTOR_DIR
+sudo cp maildecryptor.conf.configured /etc/init/maildecryptor.conf
 
-sudo chmod 0444 $MAILDECRYPTOR_DIR/*
-sudo chmod 0555 $MAILDECRYPTOR_DIR/maildecryptor_runner.py
-sudo chmod 0400 $MAILDECRYPTOR_DIR/*.pem
-sudo chmod 0400 $MAILDECRYPTOR_DIR/*.json
-sudo chown $MAILDECRYPTOR_USER:$MAILDECRYPTOR_USER $MAILDECRYPTOR_DIR/*
+sudo chmod 0400 *.pem conf.json
+sudo chown $MAILDECRYPTOR_USER:$MAILDECRYPTOR_USER *.pem conf.json
 
 echo "Done. To start the daemon execute:"
 echo " > sudo start maildecryptor"
+echo ""