Commit 45d87a1f authored by Ben Laurie's avatar Ben Laurie
Browse files

Prototype info function.

parent a3feb21b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -155,6 +155,6 @@ long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp,
	int argi, long argl, long ret);

#ifdef HEADER_SSL_H
void MS_CALLBACK apps_ssl_info_callback(SSL *s, int where, int ret);
void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret);
void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
#endif
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp, int argi,
	return(ret);
	}

void MS_CALLBACK apps_ssl_info_callback(SSL *s, int where, int ret)
void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret)
	{
	char *str;
	int w;
+3 −2
Original line number Diff line number Diff line
@@ -467,8 +467,9 @@ int BIO_read_filename(BIO *b,const char *name);
size_t BIO_ctrl_pending(BIO *b);
size_t BIO_ctrl_wpending(BIO *b);
#define BIO_flush(b)		(int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0,(bio_info_cb **)(cbp))
#define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,(bio_info_cb *)(cb))
#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \
						   cbp)
#define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb)

/* For the BIO_f_buffer() type */
#define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)
+3 −2
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ typedef struct bio_connect_st
	/* called when the connection is initially made
	 *  callback(BIO,state,ret);  The callback should return
	 * 'ret'.  state is for compatibility with the ssl info_callback */
	int (*info_callback)();
	int (*info_callback)(const BIO *bio,int state,int ret);
	} BIO_CONNECT;

static int conn_write(BIO *h, const char *buf, int num);
@@ -574,7 +574,8 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
		if (data->param_hostname)
			BIO_set_conn_hostname(dbio,data->param_hostname);
		BIO_set_nbio(dbio,data->nbio);
                (void)BIO_set_info_callback(dbio,data->info_callback);
		/* FIXME: the cast of the function seems unlikely to be a good idea */
                (void)BIO_set_info_callback(dbio,(bio_info_cb *)data->info_callback);
		}
		break;
	case BIO_CTRL_SET_CALLBACK:
+3 −1
Original line number Diff line number Diff line
@@ -486,7 +486,9 @@ static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
		{
	case BIO_CTRL_SET_CALLBACK:
		{
		SSL_set_info_callback(ssl,fp);
		/* FIXME: setting this via a completely different prototype
		   seems like a crap idea */
		SSL_set_info_callback(ssl,(void (*)(const SSL *,int,int))fp);
		}
		break;
	default:
Loading