aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-18 17:34:49 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-18 17:34:49 -0700
commit5762647e8d7f53ed9f4abed90626382b6c903ee2 (patch)
tree679869e44e131d34c9da79ff5e16dbe19baf2f1d
parentc1061753ef6a7276c33f76df954f7097c8b78303 (diff)
downloadcryptography-5762647e8d7f53ed9f4abed90626382b6c903ee2.tar.gz
cryptography-5762647e8d7f53ed9f4abed90626382b6c903ee2.tar.bz2
cryptography-5762647e8d7f53ed9f4abed90626382b6c903ee2.zip
Bind pkcs12. Refs #77 -- blocked by the x509 work
-rw-r--r--cryptography/bindings/openssl/api.py1
-rw-r--r--cryptography/bindings/openssl/pkcs12.py34
2 files changed, 35 insertions, 0 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py
index 2a6d38e6..d04ca0c0 100644
--- a/cryptography/bindings/openssl/api.py
+++ b/cryptography/bindings/openssl/api.py
@@ -36,6 +36,7 @@ class API(object):
"err",
"evp",
"opensslv",
+ "pkcs12",
"rand",
"rsa",
"ssl",
diff --git a/cryptography/bindings/openssl/pkcs12.py b/cryptography/bindings/openssl/pkcs12.py
new file mode 100644
index 00000000..92e3b12f
--- /dev/null
+++ b/cryptography/bindings/openssl/pkcs12.py
@@ -0,0 +1,34 @@
+# 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/pkcs12.h>
+"""
+
+TYPES = """
+typedef ... PKCS12;
+"""
+
+FUNCTIONS = """
+int PKCS12_parse(PKCS12 *, const char *, EVP_PKEY **, X509 **,
+ struct stack_st_X509 **);
+PKCS12 *PKCS12_create(char *, char *, EVP_PKEY *, X509 *,
+ struct stack_st_X509 *, int, int, int, int, int);
+void PKCS12_free(PKCS12 *);
+
+PKCS12 *d2i_PKCS12_bio(BIO *, PKCS12 **);
+int i2d_PKCS12_bio(BIO *, PKCS12 *);
+"""
+
+MACROS = """
+"""