diff options
author | beck <> | 2017-01-29 17:49:23 +0000 |
---|---|---|
committer | beck <> | 2017-01-29 17:49:23 +0000 |
commit | 957b11334a7afb14537322f0e4795b2e368b3f59 (patch) | |
tree | 1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/bio/bss_acpt.c | |
parent | df96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff) | |
download | openbsd-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/bio/bss_acpt.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_acpt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c index 4e3c982c2d..20508a7d5e 100644 --- a/src/lib/libcrypto/bio/bss_acpt.c +++ b/src/lib/libcrypto/bio/bss_acpt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bss_acpt.c,v 1.26 2015/07/18 22:09:30 beck Exp $ */ | 1 | /* $OpenBSD: bss_acpt.c,v 1.27 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 | * |
@@ -201,7 +201,7 @@ again: | |||
201 | switch (c->state) { | 201 | switch (c->state) { |
202 | case ACPT_S_BEFORE: | 202 | case ACPT_S_BEFORE: |
203 | if (c->param_addr == NULL) { | 203 | if (c->param_addr == NULL) { |
204 | BIOerr(BIO_F_ACPT_STATE, BIO_R_NO_ACCEPT_PORT_SPECIFIED); | 204 | BIOerror(BIO_R_NO_ACCEPT_PORT_SPECIFIED); |
205 | return (-1); | 205 | return (-1); |
206 | } | 206 | } |
207 | s = BIO_get_accept_socket(c->param_addr, c->bind_mode); | 207 | s = BIO_get_accept_socket(c->param_addr, c->bind_mode); |
@@ -211,7 +211,7 @@ again: | |||
211 | if (c->accept_nbio) { | 211 | if (c->accept_nbio) { |
212 | if (!BIO_socket_nbio(s, 1)) { | 212 | if (!BIO_socket_nbio(s, 1)) { |
213 | close(s); | 213 | close(s); |
214 | BIOerr(BIO_F_ACPT_STATE, BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET); | 214 | BIOerror(BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET); |
215 | return (-1); | 215 | return (-1); |
216 | } | 216 | } |
217 | } | 217 | } |
@@ -248,7 +248,7 @@ again: | |||
248 | 248 | ||
249 | if (c->nbio) { | 249 | if (c->nbio) { |
250 | if (!BIO_socket_nbio(i, 1)) { | 250 | if (!BIO_socket_nbio(i, 1)) { |
251 | BIOerr(BIO_F_ACPT_STATE, BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET); | 251 | BIOerror(BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET); |
252 | goto err; | 252 | goto err; |
253 | } | 253 | } |
254 | } | 254 | } |