summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/eng_lib.c
diff options
context:
space:
mode:
authorbeck <>2017-01-29 17:49:23 +0000
committerbeck <>2017-01-29 17:49:23 +0000
commit957b11334a7afb14537322f0e4795b2e368b3f59 (patch)
tree1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/engine/eng_lib.c
parentdf96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff)
downloadopenbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.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 'src/lib/libcrypto/engine/eng_lib.c')
-rw-r--r--src/lib/libcrypto/engine/eng_lib.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/libcrypto/engine/eng_lib.c b/src/lib/libcrypto/engine/eng_lib.c
index f5f54fc657..d2da29fe69 100644
--- a/src/lib/libcrypto/engine/eng_lib.c
+++ b/src/lib/libcrypto/engine/eng_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_lib.c,v 1.11 2015/02/11 03:19:37 doug Exp $ */ 1/* $OpenBSD: eng_lib.c,v 1.12 2017/01/29 17:49:23 beck Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -72,7 +72,7 @@ ENGINE_new(void)
72 72
73 ret = malloc(sizeof(ENGINE)); 73 ret = malloc(sizeof(ENGINE));
74 if (ret == NULL) { 74 if (ret == NULL) {
75 ENGINEerr(ENGINE_F_ENGINE_NEW, ERR_R_MALLOC_FAILURE); 75 ENGINEerror(ERR_R_MALLOC_FAILURE);
76 return NULL; 76 return NULL;
77 } 77 }
78 memset(ret, 0, sizeof(ENGINE)); 78 memset(ret, 0, sizeof(ENGINE));
@@ -113,8 +113,7 @@ engine_free_util(ENGINE *e, int locked)
113 int i; 113 int i;
114 114
115 if (e == NULL) { 115 if (e == NULL) {
116 ENGINEerr(ENGINE_F_ENGINE_FREE_UTIL, 116 ENGINEerror(ERR_R_PASSED_NULL_PARAMETER);
117 ERR_R_PASSED_NULL_PARAMETER);
118 return 0; 117 return 0;
119 } 118 }
120 if (locked) 119 if (locked)
@@ -245,8 +244,7 @@ int
245ENGINE_set_id(ENGINE *e, const char *id) 244ENGINE_set_id(ENGINE *e, const char *id)
246{ 245{
247 if (id == NULL) { 246 if (id == NULL) {
248 ENGINEerr(ENGINE_F_ENGINE_SET_ID, 247 ENGINEerror(ERR_R_PASSED_NULL_PARAMETER);
249 ERR_R_PASSED_NULL_PARAMETER);
250 return 0; 248 return 0;
251 } 249 }
252 e->id = id; 250 e->id = id;
@@ -257,8 +255,7 @@ int
257ENGINE_set_name(ENGINE *e, const char *name) 255ENGINE_set_name(ENGINE *e, const char *name)
258{ 256{
259 if (name == NULL) { 257 if (name == NULL) {
260 ENGINEerr(ENGINE_F_ENGINE_SET_NAME, 258 ENGINEerror(ERR_R_PASSED_NULL_PARAMETER);
261 ERR_R_PASSED_NULL_PARAMETER);
262 return 0; 259 return 0;
263 } 260 }
264 e->name = name; 261 e->name = name;