summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2021-10-24 13:46:56 +0000
committertb <>2021-10-24 13:46:56 +0000
commit4a45052f637f8486f2bfc31e5cd050e49f7e0064 (patch)
tree2aa88ada9843aa827734f120177a6285d9c3db50
parent8e1b0c908a4c5230da8f867774cf4f8c41b02174 (diff)
downloadopenbsd-4a45052f637f8486f2bfc31e5cd050e49f7e0064.tar.gz
openbsd-4a45052f637f8486f2bfc31e5cd050e49f7e0064.tar.bz2
openbsd-4a45052f637f8486f2bfc31e5cd050e49f7e0064.zip
Prepare to provide BIO_get_init()
ok beck jsing
-rw-r--r--src/lib/libcrypto/bio/bio.h11
-rw-r--r--src/lib/libcrypto/bio/bio_lib.c8
2 files changed, 14 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index 82463c6beb..735d16e6b9 100644
--- a/src/lib/libcrypto/bio/bio.h
+++ b/src/lib/libcrypto/bio/bio.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio.h,v 1.45 2018/06/02 04:41:12 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.46 2021/10/24 13:46:56 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -605,9 +605,12 @@ BIO *BIO_new(const BIO_METHOD *type);
605int BIO_set(BIO *a, const BIO_METHOD *type); 605int BIO_set(BIO *a, const BIO_METHOD *type);
606int BIO_free(BIO *a); 606int BIO_free(BIO *a);
607int BIO_up_ref(BIO *bio); 607int BIO_up_ref(BIO *bio);
608void *BIO_get_data(BIO *a); 608void *BIO_get_data(BIO *a);
609void BIO_set_data(BIO *a, void *ptr); 609void BIO_set_data(BIO *a, void *ptr);
610void BIO_set_init(BIO *a, int init); 610#if defined(LIBRESSL_NEW_API)
611int BIO_get_init(BIO *a);
612#endif
613void BIO_set_init(BIO *a, int init);
611int BIO_get_shutdown(BIO *a); 614int BIO_get_shutdown(BIO *a);
612void BIO_set_shutdown(BIO *a, int shut); 615void BIO_set_shutdown(BIO *a, int shut);
613void BIO_vfree(BIO *a); 616void BIO_vfree(BIO *a);
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c
index 7ef1784e13..05f0258947 100644
--- a/src/lib/libcrypto/bio/bio_lib.c
+++ b/src/lib/libcrypto/bio/bio_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_lib.c,v 1.29 2019/04/14 17:39:03 jsing Exp $ */ 1/* $OpenBSD: bio_lib.c,v 1.30 2021/10/24 13:46:56 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -170,6 +170,12 @@ BIO_set_data(BIO *a, void *ptr)
170 a->ptr = ptr; 170 a->ptr = ptr;
171} 171}
172 172
173int
174BIO_get_init(BIO *a)
175{
176 return a->init;
177}
178
173void 179void
174BIO_set_init(BIO *a, int init) 180BIO_set_init(BIO *a, int init)
175{ 181{