diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bss_conn.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_conn.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c index b64d7d7761..d7a8619b38 100644 --- a/src/lib/libcrypto/bio/bss_conn.c +++ b/src/lib/libcrypto/bio/bss_conn.c | |||
@@ -156,7 +156,8 @@ conn_state(BIO *b, BIO_CONNECT *c) | |||
156 | 156 | ||
157 | if (c->param_port == NULL) { | 157 | if (c->param_port == NULL) { |
158 | BIOerr(BIO_F_CONN_STATE, BIO_R_NO_PORT_SPECIFIED); | 158 | BIOerr(BIO_F_CONN_STATE, BIO_R_NO_PORT_SPECIFIED); |
159 | ERR_add_error_data(2, "host=", c->param_hostname); | 159 | ERR_asprintf_error_data("host=%s", |
160 | c->param_hostname); | ||
160 | goto exit_loop; | 161 | goto exit_loop; |
161 | } | 162 | } |
162 | c->state = BIO_CONN_S_GET_IP; | 163 | c->state = BIO_CONN_S_GET_IP; |
@@ -193,8 +194,8 @@ conn_state(BIO *b, BIO_CONNECT *c) | |||
193 | ret = socket(AF_INET, SOCK_STREAM, SOCKET_PROTOCOL); | 194 | ret = socket(AF_INET, SOCK_STREAM, SOCKET_PROTOCOL); |
194 | if (ret == -1) { | 195 | if (ret == -1) { |
195 | SYSerr(SYS_F_SOCKET, errno); | 196 | SYSerr(SYS_F_SOCKET, errno); |
196 | ERR_add_error_data(4, "host=", | 197 | ERR_asprintf_error_data("host=%s:%s", |
197 | c->param_hostname, ":", c->param_port); | 198 | c->param_hostname, c->param_port); |
198 | BIOerr(BIO_F_CONN_STATE, | 199 | BIOerr(BIO_F_CONN_STATE, |
199 | BIO_R_UNABLE_TO_CREATE_SOCKET); | 200 | BIO_R_UNABLE_TO_CREATE_SOCKET); |
200 | goto exit_loop; | 201 | goto exit_loop; |
@@ -208,9 +209,8 @@ conn_state(BIO *b, BIO_CONNECT *c) | |||
208 | if (!BIO_socket_nbio(b->num, 1)) { | 209 | if (!BIO_socket_nbio(b->num, 1)) { |
209 | BIOerr(BIO_F_CONN_STATE, | 210 | BIOerr(BIO_F_CONN_STATE, |
210 | BIO_R_ERROR_SETTING_NBIO); | 211 | BIO_R_ERROR_SETTING_NBIO); |
211 | ERR_add_error_data(4, "host=", | 212 | ERR_asprintf_error_data("host=%s:%s", |
212 | c->param_hostname, ":", | 213 | c->param_hostname, c->param_port); |
213 | c->param_port); | ||
214 | goto exit_loop; | 214 | goto exit_loop; |
215 | } | 215 | } |
216 | } | 216 | } |
@@ -221,8 +221,8 @@ conn_state(BIO *b, BIO_CONNECT *c) | |||
221 | i = setsockopt(b->num, SOL_SOCKET, SO_KEEPALIVE,(char *)&i, sizeof(i)); | 221 | i = setsockopt(b->num, SOL_SOCKET, SO_KEEPALIVE,(char *)&i, sizeof(i)); |
222 | if (i < 0) { | 222 | if (i < 0) { |
223 | SYSerr(SYS_F_SOCKET, errno); | 223 | SYSerr(SYS_F_SOCKET, errno); |
224 | ERR_add_error_data(4, "host=", | 224 | ERR_asprintf_error_data("host=%s:%s", |
225 | c->param_hostname, ":", c->param_port); | 225 | c->param_hostname, c->param_port); |
226 | BIOerr(BIO_F_CONN_STATE, BIO_R_KEEPALIVE); | 226 | BIOerr(BIO_F_CONN_STATE, BIO_R_KEEPALIVE); |
227 | goto exit_loop; | 227 | goto exit_loop; |
228 | } | 228 | } |
@@ -242,9 +242,8 @@ conn_state(BIO *b, BIO_CONNECT *c) | |||
242 | b->retry_reason = BIO_RR_CONNECT; | 242 | b->retry_reason = BIO_RR_CONNECT; |
243 | } else { | 243 | } else { |
244 | SYSerr(SYS_F_CONNECT, errno); | 244 | SYSerr(SYS_F_CONNECT, errno); |
245 | ERR_add_error_data(4, "host=", | 245 | ERR_asprintf_error_data("host=%s:%s", |
246 | c->param_hostname, ":", | 246 | c->param_hostname, c->param_port); |
247 | c->param_port); | ||
248 | BIOerr(BIO_F_CONN_STATE, | 247 | BIOerr(BIO_F_CONN_STATE, |
249 | BIO_R_CONNECT_ERROR); | 248 | BIO_R_CONNECT_ERROR); |
250 | } | 249 | } |
@@ -258,8 +257,8 @@ conn_state(BIO *b, BIO_CONNECT *c) | |||
258 | if (i) { | 257 | if (i) { |
259 | BIO_clear_retry_flags(b); | 258 | BIO_clear_retry_flags(b); |
260 | SYSerr(SYS_F_CONNECT, i); | 259 | SYSerr(SYS_F_CONNECT, i); |
261 | ERR_add_error_data(4, "host=", | 260 | ERR_asprintf_error_data("host=%s:%s", |
262 | c->param_hostname, ":", c->param_port); | 261 | c->param_hostname, c->param_port); |
263 | BIOerr(BIO_F_CONN_STATE, | 262 | BIOerr(BIO_F_CONN_STATE, |
264 | BIO_R_NBIO_CONNECT_ERROR); | 263 | BIO_R_NBIO_CONNECT_ERROR); |
265 | ret = 0; | 264 | ret = 0; |