diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/bio/bss_conn.c | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/bio/bss_conn.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_conn.c | 15 |
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 | ||
101 | static int conn_write(BIO *h, const char *buf, int num); | 101 | static 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: |