aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-09-28 17:04:59 -0700
committerDonald Stufft <donald@stufft.io>2013-09-28 17:04:59 -0700
commit8842e1650c5f3751b5c964eb1fd782a35680d236 (patch)
tree7a99e029a985be39224ed384b7f82a48a040979f
parentcc97d3898fd9aef00e487344e5bfe5fba12f0fd6 (diff)
parent7d226526c6630eb3985a81dbfe83c0fabfa88100 (diff)
downloadcryptography-8842e1650c5f3751b5c964eb1fd782a35680d236.tar.gz
cryptography-8842e1650c5f3751b5c964eb1fd782a35680d236.tar.bz2
cryptography-8842e1650c5f3751b5c964eb1fd782a35680d236.zip
Merge pull request #73 from alex/dedent
Dedent the C declarations to give us more space to work with
-rw-r--r--cryptography/bindings/openssl/evp.py32
-rw-r--r--cryptography/bindings/openssl/opensslv.py8
2 files changed, 21 insertions, 19 deletions
diff --git a/cryptography/bindings/openssl/evp.py b/cryptography/bindings/openssl/evp.py
index 7795e935..8d2230fd 100644
--- a/cryptography/bindings/openssl/evp.py
+++ b/cryptography/bindings/openssl/evp.py
@@ -12,25 +12,27 @@
# limitations under the License.
INCLUDES = """
- #include <openssl/evp.h>
+#include <openssl/evp.h>
"""
TYPES = """
- typedef struct { ...; } EVP_CIPHER_CTX;
- typedef ... EVP_CIPHER;
- typedef ... ENGINE;
+typedef struct {
+ ...;
+} EVP_CIPHER_CTX;
+typedef ... EVP_CIPHER;
+typedef ... ENGINE;
"""
FUNCTIONS = """
- void OpenSSL_add_all_algorithms();
- const EVP_CIPHER *EVP_get_cipherbyname(const char *);
- int EVP_EncryptInit_ex(EVP_CIPHER_CTX *, const EVP_CIPHER *,
- ENGINE *, unsigned char *, unsigned char *);
- int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *, int);
- int EVP_EncryptUpdate(EVP_CIPHER_CTX *, unsigned char *, int *,
- unsigned char *, int);
- int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *, unsigned char *, int *);
- int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *);
- const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *);
- int EVP_CIPHER_block_size(const EVP_CIPHER *);
+void OpenSSL_add_all_algorithms();
+const EVP_CIPHER *EVP_get_cipherbyname(const char *);
+int EVP_EncryptInit_ex(EVP_CIPHER_CTX *, const EVP_CIPHER *, ENGINE *,
+ unsigned char *, unsigned char *);
+int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *, int);
+int EVP_EncryptUpdate(EVP_CIPHER_CTX *, unsigned char *, int *,
+ unsigned char *, int);
+int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *, unsigned char *, int *);
+int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *);
+const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *);
+int EVP_CIPHER_block_size(const EVP_CIPHER *);
"""
diff --git a/cryptography/bindings/openssl/opensslv.py b/cryptography/bindings/openssl/opensslv.py
index a8f0b9b8..9b2db270 100644
--- a/cryptography/bindings/openssl/opensslv.py
+++ b/cryptography/bindings/openssl/opensslv.py
@@ -12,12 +12,12 @@
# limitations under the License.
INCLUDES = """
- #include <openssl/opensslv.h>
+#include <openssl/opensslv.h>
"""
TYPES = """
- static char *const OPENSSL_VERSION_TEXT;
+static char *const OPENSSL_VERSION_TEXT;
"""
-
-FUNCTIONS = ""
+FUNCTIONS = """
+"""