aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-03 21:19:37 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-03 21:19:37 -0700
commitce916866892230ac6e2e793e4b1a59eb5424a0ff (patch)
treeee9ee8f7a9200ff3d6dc7b5b27f0d03db6322f54
parent0f96716946c80fbaa2bab7813746baaba017f08d (diff)
downloadcryptography-ce916866892230ac6e2e793e4b1a59eb5424a0ff.tar.gz
cryptography-ce916866892230ac6e2e793e4b1a59eb5424a0ff.tar.bz2
cryptography-ce916866892230ac6e2e793e4b1a59eb5424a0ff.zip
Added bindings for OpenSSL's DSA. Refs #77.
-rw-r--r--cryptography/bindings/openssl/api.py1
-rw-r--r--cryptography/bindings/openssl/dsa.py30
2 files changed, 31 insertions, 0 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py
index 6c7462cf..99045fd2 100644
--- a/cryptography/bindings/openssl/api.py
+++ b/cryptography/bindings/openssl/api.py
@@ -26,6 +26,7 @@ class API(object):
"""
_modules = [
"bignum",
+ "dsa",
"evp",
"opensslv",
]
diff --git a/cryptography/bindings/openssl/dsa.py b/cryptography/bindings/openssl/dsa.py
new file mode 100644
index 00000000..2fa67b87
--- /dev/null
+++ b/cryptography/bindings/openssl/dsa.py
@@ -0,0 +1,30 @@
+# 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.
+
+INCLUDES = """
+#include <openssl/dsa.h>
+"""
+
+TYPES = """
+typedef ... DSA;
+"""
+
+FUNCTIONS = """
+DSA *DSA_generate_parameters(int, unsigned char *, int, int *, unsigned long *,
+ void (*)(int, int, void *), void *);
+int DSA_generate_key(DSA *);
+void DSA_free(DSA *);
+"""
+
+MACROS = """
+"""