summaryrefslogtreecommitdiffstats
path: root/ssl/bio_ssl.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2017-12-15 19:33:48 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2017-12-15 19:33:48 +0100
commitfce78bd4ede74d4fa7bd1c8195d8f7bc9403bd4c (patch)
tree47178f4d920c5fc4af3c91ee8c20ec6b8312cf96 /ssl/bio_ssl.c
parentd016d1ec34977fa9305ad5d535b03d6c5677cf1c (diff)
Fix invalid function type casts.
Rename bio_info_cb to BIO_info_cb. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4493)
Diffstat (limited to 'ssl/bio_ssl.c')
-rw-r--r--ssl/bio_ssl.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c
index 5516260409..ccc0c769c5 100644
--- a/ssl/bio_ssl.c
+++ b/ssl/bio_ssl.c
@@ -22,7 +22,7 @@ static int ssl_puts(BIO *h, const char *str);
static long ssl_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int ssl_new(BIO *h);
static int ssl_free(BIO *data);
-static long ssl_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
+static long ssl_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
typedef struct bio_ssl_st {
SSL *ssl; /* The ssl handle :-) */
/* re-negotiate every time the total number of bytes is this size */
@@ -383,14 +383,6 @@ static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr)
case BIO_CTRL_SET_CALLBACK:
ret = 0; /* use callback ctrl */
break;
- case BIO_CTRL_GET_CALLBACK:
- {
- void (**fptr) (const SSL *xssl, int type, int val);
-
- fptr = (void (**)(const SSL *xssl, int type, int val))ptr;
- *fptr = SSL_get_info_callback(ssl);
- }
- break;
default:
ret = BIO_ctrl(ssl->rbio, cmd, num, ptr);
break;
@@ -398,7 +390,7 @@ static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr)
return ret;
}
-static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
+static long ssl_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
{
SSL *ssl;
BIO_SSL *bs;
@@ -408,16 +400,10 @@ static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
ssl = bs->ssl;
switch (cmd) {
case BIO_CTRL_SET_CALLBACK:
- {
- /*
- * FIXME: setting this via a completely different prototype seems
- * like a crap idea
- */
- SSL_set_info_callback(ssl, (void (*)(const SSL *, int, int))fp);
- }
+ ret = BIO_callback_ctrl(ssl->rbio, cmd, fp);
break;
default:
- ret = BIO_callback_ctrl(ssl->rbio, cmd, fp);
+ ret = 0;
break;
}
return ret;