aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-18 15:20:42 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-18 15:20:42 -0700
commit8fc770af915637410596e122e13f6c23aef00d83 (patch)
tree7dec6eca1da4022cb200321823962622ef92267f
parente770c8b1c63bf6c0b72e8fa67787b04bf5665a0a (diff)
parent86e221f09cc20a506fd97e21fcfdb563b9917d12 (diff)
downloadcryptography-8fc770af915637410596e122e13f6c23aef00d83.tar.gz
cryptography-8fc770af915637410596e122e13f6c23aef00d83.tar.bz2
cryptography-8fc770af915637410596e122e13f6c23aef00d83.zip
Merge pull request #119 from reaperhulk/openssl-evp-md-bindings
add OpenSSL EVP_MD* functions for upcoming cryptographic hash support
-rw-r--r--cryptography/bindings/openssl/evp.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/cryptography/bindings/openssl/evp.py b/cryptography/bindings/openssl/evp.py
index 63364374..ed43c994 100644
--- a/cryptography/bindings/openssl/evp.py
+++ b/cryptography/bindings/openssl/evp.py
@@ -20,6 +20,8 @@ typedef struct {
...;
} EVP_CIPHER_CTX;
typedef ... EVP_CIPHER;
+typedef ... EVP_MD;
+typedef struct env_md_ctx_st EVP_MD_CTX;
"""
FUNCTIONS = """
@@ -35,6 +37,16 @@ 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 EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *);
+
+EVP_MD_CTX *EVP_MD_CTX_create();
+int EVP_MD_CTX_copy_ex(EVP_MD_CTX *, const EVP_MD_CTX *);
+int EVP_DigestInit_ex(EVP_MD_CTX *, const EVP_MD *, ENGINE *);
+int EVP_DigestUpdate(EVP_MD_CTX *, const void *, size_t);
+int EVP_DigestFinal_ex(EVP_MD_CTX *, unsigned char *, unsigned int *);
+void EVP_MD_CTX_destroy(EVP_MD_CTX *);
+const EVP_MD *EVP_get_digestbyname(const char *);
+const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *);
+int EVP_MD_size(const EVP_MD *);
"""
MACROS = """