summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bss_conn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/bss_conn.c')
-rw-r--r--src/lib/libcrypto/bio/bss_conn.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c
index a6b77a2cb9..f91ae4c8c6 100644
--- a/src/lib/libcrypto/bio/bss_conn.c
+++ b/src/lib/libcrypto/bio/bss_conn.c
@@ -56,7 +56,7 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#ifndef NO_SOCK 59#ifndef OPENSSL_NO_SOCK
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <errno.h> 62#include <errno.h>
@@ -64,13 +64,13 @@
64#include "cryptlib.h" 64#include "cryptlib.h"
65#include <openssl/bio.h> 65#include <openssl/bio.h>
66 66
67#ifdef WIN16 67#ifdef OPENSSL_SYS_WIN16
68#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ 68#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
69#else 69#else
70#define SOCKET_PROTOCOL IPPROTO_TCP 70#define SOCKET_PROTOCOL IPPROTO_TCP
71#endif 71#endif
72 72
73#if (defined(VMS) && __VMS_VER < 70000000) 73#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
74/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ 74/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
75#undef FIONBIO 75#undef FIONBIO
76#endif 76#endif
@@ -95,7 +95,7 @@ typedef struct bio_connect_st
95 /* called when the connection is initially made 95 /* called when the connection is initially made
96 * callback(BIO,state,ret); The callback should return 96 * callback(BIO,state,ret); The callback should return
97 * 'ret'. state is for compatibility with the ssl info_callback */ 97 * 'ret'. state is for compatibility with the ssl info_callback */
98 int (*info_callback)(); 98 int (*info_callback)(const BIO *bio,int state,int ret);
99 } BIO_CONNECT; 99 } BIO_CONNECT;
100 100
101static int conn_write(BIO *h, const char *buf, int num); 101static int conn_write(BIO *h, const char *buf, int num);
@@ -236,7 +236,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c)
236 } 236 }
237 c->state=BIO_CONN_S_CONNECT; 237 c->state=BIO_CONN_S_CONNECT;
238 238
239#if defined(SO_KEEPALIVE) && !defined(MPE) 239#if defined(SO_KEEPALIVE) && !defined(OPENSSL_SYS_MPE)
240 i=1; 240 i=1;
241 i=setsockopt(b->num,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); 241 i=setsockopt(b->num,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
242 if (i < 0) 242 if (i < 0)
@@ -574,7 +574,8 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
574 if (data->param_hostname) 574 if (data->param_hostname)
575 BIO_set_conn_hostname(dbio,data->param_hostname); 575 BIO_set_conn_hostname(dbio,data->param_hostname);
576 BIO_set_nbio(dbio,data->nbio); 576 BIO_set_nbio(dbio,data->nbio);
577 (void)BIO_set_info_callback(dbio,data->info_callback); 577 /* FIXME: the cast of the function seems unlikely to be a good idea */
578 (void)BIO_set_info_callback(dbio,(bio_info_cb *)data->info_callback);
578 } 579 }
579 break; 580 break;
580 case BIO_CTRL_SET_CALLBACK: 581 case BIO_CTRL_SET_CALLBACK:
@@ -613,7 +614,7 @@ static long conn_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
613 { 614 {
614 case BIO_CTRL_SET_CALLBACK: 615 case BIO_CTRL_SET_CALLBACK:
615 { 616 {
616 data->info_callback=(int (*)())fp; 617 data->info_callback=(int (*)(const struct bio_st *, int, int))fp;
617 } 618 }
618 break; 619 break;
619 default: 620 default: