diff options
Diffstat (limited to 'main/openssl/0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch')
-rw-r--r-- | main/openssl/0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/main/openssl/0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch b/main/openssl/0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch index 6033afc4ed..963d2962fb 100644 --- a/main/openssl/0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch +++ b/main/openssl/0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch @@ -1,7 +1,8 @@ -From 8290b2ced17ee3d0e52345180ef4fc6d79bc0751 Mon Sep 17 00:00:00 2001 +From ba6e7dcf33277954cb3adc7767555a346906f33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> Date: Fri, 4 Jun 2010 09:48:39 +0300 -Subject: [PATCH 1/3] crypto/hmac: support EVP_MD_CTX_FLAG_ONESHOT and set it properly +Subject: [PATCH 1/3] crypto/hmac: support EVP_MD_CTX_FLAG_ONESHOT and set it + properly Some engines (namely VIA C7 Padlock) work only if EVP_MD_CTX_FLAG_ONESHOT is set before final update. This is because some crypto accelerators cannot @@ -12,11 +13,11 @@ differently here. It is set before the final EVP_DigestUpdate call, not necessarily before EVP_DigestInit call. This will not cause any problems though. --- - crypto/hmac/hmac.c | 14 +++++++++++--- - 1 files changed, 11 insertions(+), 3 deletions(-) + crypto/hmac/hmac.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c -index cbc1c76..a75a35d 100644 +index 6899be6..b157c32 100644 --- a/crypto/hmac/hmac.c +++ b/crypto/hmac/hmac.c @@ -68,6 +68,7 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, @@ -54,7 +55,7 @@ index cbc1c76..a75a35d 100644 } EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->i_ctx); } -@@ -166,7 +173,8 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, +@@ -163,7 +170,8 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, if (md == NULL) md=m; HMAC_CTX_init(&c); @@ -64,7 +65,7 @@ index cbc1c76..a75a35d 100644 HMAC_Update(&c,d,n); HMAC_Final(&c,md,md_len); HMAC_CTX_cleanup(&c); -@@ -176,8 +184,8 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, +@@ -173,8 +181,8 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags) { EVP_MD_CTX_set_flags(&ctx->i_ctx, flags); @@ -76,5 +77,5 @@ index cbc1c76..a75a35d 100644 #endif -- -1.7.0.4 +1.7.11.3 |