-/* $OpenBSD: bio.h,v 1.31 2018/02/17 13:57:14 tb Exp $ */
+/* $OpenBSD: bio.h,v 1.32 2018/02/18 12:58:25 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BIO * BIO_new(BIO_METHOD *type);
int BIO_set(BIO *a, BIO_METHOD *type);
int BIO_free(BIO *a);
+void *BIO_get_data(BIO *a);
+void BIO_set_data(BIO *a, void *ptr);
+void BIO_set_init(BIO *a, int init);
void BIO_vfree(BIO *a);
int BIO_read(BIO *b, void *data, int len)
__attribute__((__bounded__(__buffer__,2,3)));
-/* $OpenBSD: bio_lib.c,v 1.23 2017/01/29 17:49:22 beck Exp $ */
+/* $OpenBSD: bio_lib.c,v 1.24 2018/02/18 12:58:25 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BIO_free(a);
}
+void *
+BIO_get_data(BIO *a)
+{
+ return (a->ptr);
+}
+
+void
+BIO_set_data(BIO *a, void *ptr)
+{
+ a->ptr = ptr;
+}
+
+void
+BIO_set_init(BIO *a, int init)
+{
+ a->init = init;
+}
+
void
BIO_clear_flags(BIO *b, int flags)
{