summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-06-27 06:37:13 -0300
committerdrebs <drebs@leap.se>2017-07-18 15:22:23 -0300
commit74dae7251e2aa28f1887f36d47bcf9366557bbe6 (patch)
treeb3c75d9c012e2fe5cb065f906f50d955f0c6deb0
parent9a14e2bae39709402595326652083c2af05d452e (diff)
[refactor] move preamble module to common
This move allows server to use it on #8868 as described in #8890 -- Relates: #8890
-rw-r--r--src/leap/soledad/client/_crypto.py7
-rw-r--r--src/leap/soledad/common/preamble.py (renamed from src/leap/soledad/client/_preamble.py)2
-rw-r--r--testing/tests/client/test_crypto.py2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/soledad/client/_crypto.py b/src/leap/soledad/client/_crypto.py
index d0fb6e7f..998b70fa 100644
--- a/src/leap/soledad/client/_crypto.py
+++ b/src/leap/soledad/client/_crypto.py
@@ -86,8 +86,11 @@ from cryptography.hazmat.backends import default_backend
from zope.interface import implementer
-from ._preamble import InvalidPreambleException, decode_preamble, Preamble
-from ._preamble import ENC_SCHEME, ENC_METHOD, BLOB_SIGNATURE_MAGIC
+from leap.soledad.common.preamble import InvalidPreambleException
+from leap.soledad.common.preamble import decode_preamble
+from leap.soledad.common.preamble import Preamble
+from leap.soledad.common.preamble import ENC_SCHEME, ENC_METHOD
+from leap.soledad.common.preamble import BLOB_SIGNATURE_MAGIC
SECRET_LENGTH = 64
diff --git a/src/leap/soledad/client/_preamble.py b/src/leap/soledad/common/preamble.py
index 262d70ce..724923c5 100644
--- a/src/leap/soledad/client/_preamble.py
+++ b/src/leap/soledad/common/preamble.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# _preamble.py
+# preamble.py
# Copyright (C) 2017 LEAP Encryption Access Project
#
# This program is free software: you can redistribute it and/or modify
diff --git a/testing/tests/client/test_crypto.py b/testing/tests/client/test_crypto.py
index 5a50b118..2a93081c 100644
--- a/testing/tests/client/test_crypto.py
+++ b/testing/tests/client/test_crypto.py
@@ -34,7 +34,7 @@ from leap.soledad.common.document import SoledadDocument
from test_soledad.util import BaseSoledadTest
from leap.soledad.client import _crypto
from leap.soledad.client import _scrypt
-from leap.soledad.client import _preamble
+from leap.soledad.common import preamble as _preamble
from twisted.trial import unittest
from twisted.internet import defer