diff options
Diffstat (limited to 'src/lib/libcrypto/engine/eng_init.c')
-rw-r--r-- | src/lib/libcrypto/engine/eng_init.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/engine/eng_init.c b/src/lib/libcrypto/engine/eng_init.c index b50e22594c..75d6698c70 100644 --- a/src/lib/libcrypto/engine/eng_init.c +++ b/src/lib/libcrypto/engine/eng_init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: eng_init.c,v 1.7 2015/02/11 03:19:37 doug Exp $ */ | 1 | /* $OpenBSD: eng_init.c,v 1.8 2017/01/29 17:49:23 beck Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -106,8 +106,7 @@ engine_unlocked_finish(ENGINE *e, int unlock_for_handlers) | |||
106 | 106 | ||
107 | /* Release the structural reference too */ | 107 | /* Release the structural reference too */ |
108 | if (!engine_free_util(e, 0)) { | 108 | if (!engine_free_util(e, 0)) { |
109 | ENGINEerr(ENGINE_F_ENGINE_UNLOCKED_FINISH, | 109 | ENGINEerror(ENGINE_R_FINISH_FAILED); |
110 | ENGINE_R_FINISH_FAILED); | ||
111 | return 0; | 110 | return 0; |
112 | } | 111 | } |
113 | return to_return; | 112 | return to_return; |
@@ -120,7 +119,7 @@ ENGINE_init(ENGINE *e) | |||
120 | int ret; | 119 | int ret; |
121 | 120 | ||
122 | if (e == NULL) { | 121 | if (e == NULL) { |
123 | ENGINEerr(ENGINE_F_ENGINE_INIT, ERR_R_PASSED_NULL_PARAMETER); | 122 | ENGINEerror(ERR_R_PASSED_NULL_PARAMETER); |
124 | return 0; | 123 | return 0; |
125 | } | 124 | } |
126 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | 125 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
@@ -136,14 +135,14 @@ ENGINE_finish(ENGINE *e) | |||
136 | int to_return = 1; | 135 | int to_return = 1; |
137 | 136 | ||
138 | if (e == NULL) { | 137 | if (e == NULL) { |
139 | ENGINEerr(ENGINE_F_ENGINE_FINISH, ERR_R_PASSED_NULL_PARAMETER); | 138 | ENGINEerror(ERR_R_PASSED_NULL_PARAMETER); |
140 | return 0; | 139 | return 0; |
141 | } | 140 | } |
142 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | 141 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
143 | to_return = engine_unlocked_finish(e, 1); | 142 | to_return = engine_unlocked_finish(e, 1); |
144 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | 143 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
145 | if (!to_return) { | 144 | if (!to_return) { |
146 | ENGINEerr(ENGINE_F_ENGINE_FINISH, ENGINE_R_FINISH_FAILED); | 145 | ENGINEerror(ENGINE_R_FINISH_FAILED); |
147 | return 0; | 146 | return 0; |
148 | } | 147 | } |
149 | return to_return; | 148 | return to_return; |