struct ssl_sock_ctx *ctx;
int ret;
+#if OPENSSL_VERSION_NUMBER < 0x10100000
+ ctx = h->ptr;
+#else
ctx = BIO_get_data(h);
+#endif
tmpbuf.size = num;
tmpbuf.area = (void *)(uintptr_t)buf;
tmpbuf.data = num;
struct ssl_sock_ctx *ctx;
int ret;
+#if OPENSSL_VERSION_NUMBER < 0x10100000
+ ctx = h->ptr;
+#else
ctx = BIO_get_data(h);
+#endif
tmpbuf.size = size;
tmpbuf.area = buf;
tmpbuf.data = 0;
static int ha_ssl_new(BIO *h)
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ h->init = 1;
+ h->ptr = NULL;
+#else
BIO_set_init(h, 1);
BIO_set_data(h, NULL);
+#endif
BIO_clear_flags(h, ~0);
return 1;
}
ERR_load_SSL_strings();
#if OPENSSL_VERSION_NUMBER < 0x10100000L
ha_meth = malloc(sizeof(*ha_meth));
- bzero(ha_meth, sizeof(*ha_metho));
+ bzero(ha_meth, sizeof(*ha_meth));
ha_meth->bwrite = ha_ssl_write;
ha_meth->bread = ha_ssl_read;
ha_meth->ctrl = ha_ssl_ctrl;