X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fbio_ssl.c;h=aa296996e665254e5ce094367caf0e1897b812d2;hp=ed08327228d8251fd64f00597f6bc0b75b4ad41f;hb=018e57c74d9dc6b5676aead4be11cd28a8617ea4;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c index ed08327228..aa296996e6 100644 --- a/ssl/bio_ssl.c +++ b/ssl/bio_ssl.c @@ -60,27 +60,17 @@ #include #include #include -#include "crypto.h" -#include "bio.h" -#include "err.h" -#include "ssl.h" +#include +#include +#include +#include -#ifndef NOPROTO static int ssl_write(BIO *h,char *buf,int num); static int ssl_read(BIO *h,char *buf,int size); static int ssl_puts(BIO *h,char *str); static long ssl_ctrl(BIO *h,int cmd,long arg1,char *arg2); static int ssl_new(BIO *h); static int ssl_free(BIO *data); -#else -static int ssl_write(); -static int ssl_read(); -static int ssl_puts(); -static long ssl_ctrl(); -static int ssl_new(); -static int ssl_free(); -#endif - typedef struct bio_ssl_st { SSL *ssl; /* The ssl handle :-) */ @@ -104,6 +94,12 @@ static BIO_METHOD methods_sslp= ssl_free, }; +union void_fn_to_char_u + { + char *char_p; + void (*fn_p)(); + }; + BIO_METHOD *BIO_f_ssl(void) { return(&methods_sslp); @@ -454,7 +450,12 @@ static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr) ret=BIO_ctrl(ssl->rbio,cmd,num,ptr); break; case BIO_CTRL_SET_CALLBACK: - SSL_set_info_callback(ssl,(void (*)())ptr); + { + union void_fn_to_char_u tmp_cb; + + tmp_cb.char_p = ptr; + SSL_set_info_callback(ssl,tmp_cb.fn_p); + } break; case BIO_CTRL_GET_CALLBACK: {