#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "crypto.h"
-#include "bio.h"
-#include "err.h"
-#include "ssl.h"
+#include <openssl/crypto.h>
+#include <openssl/bio.h>
+#include <openssl/err.h>
+#include <openssl/ssl.h>
-#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 :-) */
ssl_free,
};
+union void_fn_to_char_u
+ {
+ char *char_p;
+ void (*fn_p)();
+ };
+
BIO_METHOD *BIO_f_ssl(void)
{
return(&methods_sslp);
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:
{