From 2f781956779d64e32f3cfb0016a532de2bb6dc89 Mon Sep 17 00:00:00 2001
From: Alessandro Ghedini <alessandro@ghedini.me>
Date: Tue, 8 Mar 2016 23:12:53 +0000
Subject: [PATCH] Use correct function ID in error path

This fixes "make update".

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
---
 engines/e_dasync.c     | 2 +-
 engines/e_dasync_err.c | 2 ++
 engines/e_dasync_err.h | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/engines/e_dasync.c b/engines/e_dasync.c
index 1f5cc0215b..0e10f6dfdd 100644
--- a/engines/e_dasync.c
+++ b/engines/e_dasync.c
@@ -674,7 +674,7 @@ static int dasync_cipher_init_key_helper(EVP_CIPHER_CTX *ctx,
         pipe_ctx->inner_cipher_data = OPENSSL_zalloc(
             EVP_CIPHER_impl_ctx_size(cipher));
         if (pipe_ctx->inner_cipher_data == NULL) {
-            DASYNCerr(DASYNC_F_DASYNC_AES128_INIT_KEY,
+            DASYNCerr(DASYNC_F_DASYNC_CIPHER_INIT_KEY_HELPER,
                         ERR_R_MALLOC_FAILURE);
             return 0;
         }
diff --git a/engines/e_dasync_err.c b/engines/e_dasync_err.c
index ed5e98ee3f..3b462ba851 100644
--- a/engines/e_dasync_err.c
+++ b/engines/e_dasync_err.c
@@ -75,6 +75,8 @@ static ERR_STRING_DATA DASYNC_str_functs[] = {
      "dasync_aes128_cbc_hmac_sha1_init_key"},
     {ERR_FUNC(DASYNC_F_DASYNC_AES128_INIT_KEY), "dasync_aes128_init_key"},
     {ERR_FUNC(DASYNC_F_DASYNC_BN_MOD_EXP), "DASYNC_BN_MOD_EXP"},
+    {ERR_FUNC(DASYNC_F_DASYNC_CIPHER_INIT_KEY_HELPER),
+     "dasync_cipher_init_key_helper"},
     {ERR_FUNC(DASYNC_F_DASYNC_MOD_EXP), "DASYNC_MOD_EXP"},
     {ERR_FUNC(DASYNC_F_DASYNC_PRIVATE_DECRYPT), "DASYNC_PRIVATE_DECRYPT"},
     {ERR_FUNC(DASYNC_F_DASYNC_PRIVATE_ENCRYPT), "DASYNC_PRIVATE_ENCRYPT"},
diff --git a/engines/e_dasync_err.h b/engines/e_dasync_err.h
index 560f163a6f..304eeef5e9 100644
--- a/engines/e_dasync_err.h
+++ b/engines/e_dasync_err.h
@@ -67,7 +67,7 @@ extern "C" {
 static void ERR_load_DASYNC_strings(void);
 static void ERR_unload_DASYNC_strings(void);
 static void ERR_DASYNC_error(int function, int reason, char *file, int line);
-#define DASYNCerr(f,r) ERR_DASYNC_error((f),(r),OPENSSL_FILE,OPENSSL_LINE)
+# define DASYNCerr(f,r) ERR_DASYNC_error((f),(r),OPENSSL_FILE,OPENSSL_LINE)
 
 /* Error codes for the DASYNC functions. */
 
@@ -77,6 +77,7 @@ static void ERR_DASYNC_error(int function, int reason, char *file, int line);
 # define DASYNC_F_DASYNC_AES128_CBC_HMAC_SHA1_INIT_KEY    109
 # define DASYNC_F_DASYNC_AES128_INIT_KEY                  108
 # define DASYNC_F_DASYNC_BN_MOD_EXP                       101
+# define DASYNC_F_DASYNC_CIPHER_INIT_KEY_HELPER           110
 # define DASYNC_F_DASYNC_MOD_EXP                          102
 # define DASYNC_F_DASYNC_PRIVATE_DECRYPT                  103
 # define DASYNC_F_DASYNC_PRIVATE_ENCRYPT                  104