aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-08-07 23:50:51 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-08-07 23:50:51 -0700
commit6c4570da8218f0f003c2a4839927f3baadfd95aa (patch)
tree2378320f060f73ec4d4560b99446fffb28577d36
parent3562d05f7b6084e6c4de5ba547d0f5e03a349e1b (diff)
parent5e7926f5afbb155168a000008c842f1228a2e203 (diff)
downloadcryptography-6c4570da8218f0f003c2a4839927f3baadfd95aa.tar.gz
cryptography-6c4570da8218f0f003c2a4839927f3baadfd95aa.tar.bz2
cryptography-6c4570da8218f0f003c2a4839927f3baadfd95aa.zip
Merge pull request #21 from hynek/rename-c-to-bindings
Refactor into latest design decision
-rw-r--r--cryptography/bindings/__init__.py0
-rw-r--r--cryptography/bindings/openssl/__init__.py (renamed from cryptography/c/__init__.py)2
-rw-r--r--cryptography/bindings/openssl/api.py (renamed from cryptography/c/api.py)4
-rw-r--r--docs/architecture.rst6
-rw-r--r--tests/bindings/__init__.py0
-rw-r--r--tests/bindings/test_openssl.py19
-rw-r--r--tests/test_c.py6
7 files changed, 26 insertions, 11 deletions
diff --git a/cryptography/bindings/__init__.py b/cryptography/bindings/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/cryptography/bindings/__init__.py
diff --git a/cryptography/c/__init__.py b/cryptography/bindings/openssl/__init__.py
index 09bf4977..6c803fbc 100644
--- a/cryptography/c/__init__.py
+++ b/cryptography/bindings/openssl/__init__.py
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from cryptography.c.api import api
+from cryptography.bindings.openssl import api
__all__ = ["api"]
diff --git a/cryptography/c/api.py b/cryptography/bindings/openssl/api.py
index ea8827f1..3cc6a0e9 100644
--- a/cryptography/c/api.py
+++ b/cryptography/bindings/openssl/api.py
@@ -15,7 +15,9 @@ from __future__ import absolute_import, division, print_function
class API(object):
- """OpenSSL API wrapper."""
+ """
+ OpenSSL API wrapper.
+ """
api = API()
diff --git a/docs/architecture.rst b/docs/architecture.rst
index 7b394950..0a9550c0 100644
--- a/docs/architecture.rst
+++ b/docs/architecture.rst
@@ -8,11 +8,11 @@ Architecture
``cryptography`` has three different layers:
-* ``cryptography.c``: This package contains bindings to low level cryptographic
- libraries. Our initial target will be OpenSSL.
+* ``cryptography.bindings``: This package contains bindings to low level
+ cryptographic libraries. Our initial target will be OpenSSL.
* ``cryptography.primitives``: This packages contains low level algorithms,
things like ``AES`` or ``SHA1``. This is implemented on top of
- ``cryptography.c``.
+ ``cryptography.bindings``.
* ``cryptography``: This package contains higher level recipes, for example
"encrypt and then MAC". This is implemented on top of
``cryptography.primitives``.
diff --git a/tests/bindings/__init__.py b/tests/bindings/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/bindings/__init__.py
diff --git a/tests/bindings/test_openssl.py b/tests/bindings/test_openssl.py
new file mode 100644
index 00000000..9d637222
--- /dev/null
+++ b/tests/bindings/test_openssl.py
@@ -0,0 +1,19 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from cryptography.bindings.openssl import api
+
+
+class TestOpenSSL(object):
+ def test_api_exists(self):
+ assert api
diff --git a/tests/test_c.py b/tests/test_c.py
deleted file mode 100644
index c50968e2..00000000
--- a/tests/test_c.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from cryptography.c import api
-
-
-class TestC(object):
- def test_api_exists(self):
- assert api