int argi, long argl, int ret, size_t *processed)
{
BIO *out;
- BIO_MMSG_CB_ARGS *mmsgargs;
+ const BIO_MMSG_CB_ARGS *mmsgargs;
size_t i;
out = (BIO *)BIO_get_callback_arg(bio);
break;
case (BIO_CB_RECVMMSG | BIO_CB_RETURN):
- mmsgargs = (BIO_MMSG_CB_ARGS *)argp;
+ mmsgargs = (const BIO_MMSG_CB_ARGS *)argp;
if (ret > 0) {
for (i = 0; i < *(mmsgargs->msgs_processed); i++) {
BIO_MSG *msg = (BIO_MSG *)((char *)mmsgargs->msg
+ (i * mmsgargs->stride));
BIO_printf(out, "read from %p [%p] (%zu bytes => %zu (0x%zX))\n",
- (void *)bio, (void *)msg->data, msg->data_len,
+ (void *)bio, msg->data, msg->data_len,
msg->data_len, msg->data_len);
if (msg->data_len <= INT_MAX)
BIO_dump(out, msg->data, (int)msg->data_len);
BIO_MSG *msg = mmsgargs->msg;
BIO_printf(out, "read from %p [%p] (%zu bytes => %d)\n",
- (void *)bio, (void *)msg->data, msg->data_len, ret);
+ (void *)bio, msg->data, msg->data_len, ret);
}
break;
case (BIO_CB_SENDMMSG | BIO_CB_RETURN):
- mmsgargs = (BIO_MMSG_CB_ARGS *)argp;
+ mmsgargs = (const BIO_MMSG_CB_ARGS *)argp;
if (ret > 0) {
for (i = 0; i < *(mmsgargs->msgs_processed); i++) {
BIO_MSG *msg = (BIO_MSG *)((char *)mmsgargs->msg
+ (i * mmsgargs->stride));
BIO_printf(out, "write to %p [%p] (%zu bytes => %zu (0x%zX))\n",
- (void *)bio, (void *)msg->data, msg->data_len,
+ (void *)bio, msg->data, msg->data_len,
msg->data_len, msg->data_len);
if (msg->data_len <= INT_MAX)
BIO_dump(out, msg->data, (int)msg->data_len);
BIO_MSG *msg = mmsgargs->msg;
BIO_printf(out, "write to %p [%p] (%zu bytes => %d)\n",
- (void *)bio, (void *)msg->data, msg->data_len, ret);
+ (void *)bio, msg->data, msg->data_len, ret);
}
break;
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
struct timeval tv;
#endif
- const char *servername = NULL;
+ char *servername = NULL;
char *sname_alloc = NULL;
int noservername = 0;
const char *alpn_in = NULL;
int bytes = 0;
int ssl_flg = 0x800;
int pos;
- const unsigned char *packet = (const unsigned char *)sbuf;
+ unsigned char *packet = (unsigned char *)sbuf;
/* Receiving Initial Handshake packet. */
- bytes = BIO_read(sbio, (void *)packet, BUFSIZZ);
+ bytes = BIO_read(sbio, packet, BUFSIZZ);
if (bytes < 0) {
BIO_printf(bio_err, "BIO_read failed\n");
goto shut;
rsp = d2i_OCSP_RESPONSE(NULL, &p, len);
if (rsp == NULL) {
BIO_puts(arg, "OCSP response parse error\n");
- BIO_dump_indent(arg, (char *)p, len, 4);
+ BIO_dump_indent(arg, p, len, 4);
return 0;
}
print_ocsp_response(arg, rsp);