diff options
author | 2017-01-29 17:49:22 +0000 | |
---|---|---|
committer | 2017-01-29 17:49:22 +0000 | |
commit | 5067ae9f807f8af9e6350e51e6a54619386c06ba (patch) | |
tree | f2455d670f0ea5c04a6e9cbdf4d8ef0d4ff40c47 /lib/libcrypto/engine/eng_init.c | |
parent | Ensure the build user can write to the GLOBAL_AUTOCONF_CACHE file by (diff) | |
download | wireguard-openbsd-5067ae9f807f8af9e6350e51e6a54619386c06ba.tar.xz wireguard-openbsd-5067ae9f807f8af9e6350e51e6a54619386c06ba.zip |
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@
Diffstat (limited to 'lib/libcrypto/engine/eng_init.c')
-rw-r--r-- | lib/libcrypto/engine/eng_init.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libcrypto/engine/eng_init.c b/lib/libcrypto/engine/eng_init.c index b50e22594c1..75d6698c707 100644 --- a/lib/libcrypto/engine/eng_init.c +++ b/lib/libcrypto/engine/eng_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eng_init.c,v 1.7 2015/02/11 03:19:37 doug Exp $ */ +/* $OpenBSD: eng_init.c,v 1.8 2017/01/29 17:49:23 beck Exp $ */ /* ==================================================================== * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. * @@ -106,8 +106,7 @@ engine_unlocked_finish(ENGINE *e, int unlock_for_handlers) /* Release the structural reference too */ if (!engine_free_util(e, 0)) { - ENGINEerr(ENGINE_F_ENGINE_UNLOCKED_FINISH, - ENGINE_R_FINISH_FAILED); + ENGINEerror(ENGINE_R_FINISH_FAILED); return 0; } return to_return; @@ -120,7 +119,7 @@ ENGINE_init(ENGINE *e) int ret; if (e == NULL) { - ENGINEerr(ENGINE_F_ENGINE_INIT, ERR_R_PASSED_NULL_PARAMETER); + ENGINEerror(ERR_R_PASSED_NULL_PARAMETER); return 0; } CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); @@ -136,14 +135,14 @@ ENGINE_finish(ENGINE *e) int to_return = 1; if (e == NULL) { - ENGINEerr(ENGINE_F_ENGINE_FINISH, ERR_R_PASSED_NULL_PARAMETER); + ENGINEerror(ERR_R_PASSED_NULL_PARAMETER); return 0; } CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); to_return = engine_unlocked_finish(e, 1); CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); if (!to_return) { - ENGINEerr(ENGINE_F_ENGINE_FINISH, ENGINE_R_FINISH_FAILED); + ENGINEerror(ENGINE_R_FINISH_FAILED); return 0; } return to_return; |