From bc6f74f046ac3a2b41edbfba1529b6b32d893761 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 8 Mar 2019 01:06:30 +0800 Subject: add poly1305 NID/EVP, and EVP_DigestSign{Update,Final} for incremental (#4799) --- src/_cffi_src/openssl/evp.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/_cffi_src/openssl/evp.py') diff --git a/src/_cffi_src/openssl/evp.py b/src/_cffi_src/openssl/evp.py index e4d3f057..a0767021 100644 --- a/src/_cffi_src/openssl/evp.py +++ b/src/_cffi_src/openssl/evp.py @@ -25,6 +25,7 @@ static const int EVP_PKEY_X25519; static const int EVP_PKEY_ED25519; static const int EVP_PKEY_X448; static const int EVP_PKEY_ED448; +static const int EVP_PKEY_POLY1305; static const int EVP_MAX_MD_SIZE; static const int EVP_CTRL_AEAD_SET_IVLEN; static const int EVP_CTRL_AEAD_GET_TAG; @@ -83,6 +84,8 @@ int EVP_VerifyFinal(EVP_MD_CTX *, const unsigned char *, unsigned int, int EVP_DigestSignInit(EVP_MD_CTX *, EVP_PKEY_CTX **, const EVP_MD *, ENGINE *, EVP_PKEY *); +int EVP_DigestSignUpdate(EVP_MD_CTX *, const void *, size_t); +int EVP_DigestSignFinal(EVP_MD_CTX *, unsigned char *, size_t *); int EVP_DigestVerifyInit(EVP_MD_CTX *, EVP_PKEY_CTX **, const EVP_MD *, ENGINE *, EVP_PKEY *); @@ -266,4 +269,10 @@ static const long Cryptography_HAS_EVP_DIGESTFINAL_XOF = 1; #ifndef EVP_PKEY_ED448 #define EVP_PKEY_ED448 NID_ED448 #endif + +/* This is tied to poly1305 support so we reuse the Cryptography_HAS_POLY1305 + conditional to remove it. */ +#ifndef EVP_PKEY_POLY1305 +#define EVP_PKEY_POLY1305 NID_poly1305 +#endif """ -- cgit v1.2.3