summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_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/dsa/dsa_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/dsa/dsa_lib.c')
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c
index 8016f2f7cb..58af74889c 100644
--- a/src/lib/libcrypto/dsa/dsa_lib.c
+++ b/src/lib/libcrypto/dsa/dsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_lib.c,v 1.22 2015/02/11 03:19:37 doug Exp $ */ 1/* $OpenBSD: dsa_lib.c,v 1.23 2017/01/29 17:49:22 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -126,14 +126,14 @@ DSA_new_method(ENGINE *engine)
126 126
127 ret = malloc(sizeof(DSA)); 127 ret = malloc(sizeof(DSA));
128 if (ret == NULL) { 128 if (ret == NULL) {
129 DSAerr(DSA_F_DSA_NEW_METHOD, ERR_R_MALLOC_FAILURE); 129 DSAerror(ERR_R_MALLOC_FAILURE);
130 return NULL; 130 return NULL;
131 } 131 }
132 ret->meth = DSA_get_default_method(); 132 ret->meth = DSA_get_default_method();
133#ifndef OPENSSL_NO_ENGINE 133#ifndef OPENSSL_NO_ENGINE
134 if (engine) { 134 if (engine) {
135 if (!ENGINE_init(engine)) { 135 if (!ENGINE_init(engine)) {
136 DSAerr(DSA_F_DSA_NEW_METHOD, ERR_R_ENGINE_LIB); 136 DSAerror(ERR_R_ENGINE_LIB);
137 free(ret); 137 free(ret);
138 return NULL; 138 return NULL;
139 } 139 }
@@ -143,7 +143,7 @@ DSA_new_method(ENGINE *engine)
143 if (ret->engine) { 143 if (ret->engine) {
144 ret->meth = ENGINE_get_DSA(ret->engine); 144 ret->meth = ENGINE_get_DSA(ret->engine);
145 if (!ret->meth) { 145 if (!ret->meth) {
146 DSAerr(DSA_F_DSA_NEW_METHOD, ERR_R_ENGINE_LIB); 146 DSAerror(ERR_R_ENGINE_LIB);
147 ENGINE_finish(ret->engine); 147 ENGINE_finish(ret->engine);
148 free(ret); 148 free(ret);
149 return NULL; 149 return NULL;