summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-01-05 20:22:27 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-01-05 20:22:27 +0000
commit1db10656d30f459b11dbb68b14d1e3521effec41 (patch)
tree47937925560334d0525df4506314c15399b95d84
parent995364c71b4e2672a231cbfd7adcd5e099d0ec32 (diff)
Prepare to provide BIO_set_next().
This will be needed in libssl and freerdp after the next bump. ok inoguchi jsing
-rw-r--r--lib/libcrypto/bio/bio.h5
-rw-r--r--lib/libcrypto/bio/bio_lib.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h
index b147e13e5f2..9697c8ad3b9 100644
--- a/lib/libcrypto/bio/bio.h
+++ b/lib/libcrypto/bio/bio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio.h,v 1.48 2021/11/29 18:37:34 tb Exp $ */
+/* $OpenBSD: bio.h,v 1.49 2022/01/05 20:22:26 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -632,6 +632,9 @@ BIO * BIO_pop(BIO *b);
void BIO_free_all(BIO *a);
BIO * BIO_find_type(BIO *b, int bio_type);
BIO * BIO_next(BIO *b);
+#if defined(LIBRESSL_OPAQUE_BIO) || defined(LIBRESSL_CRYPTO_INTERNAL)
+void BIO_set_next(BIO *b, BIO *next);
+#endif
BIO * BIO_get_retry_BIO(BIO *bio, int *reason);
int BIO_get_retry_reason(BIO *bio);
BIO * BIO_dup_chain(BIO *in);
diff --git a/lib/libcrypto/bio/bio_lib.c b/lib/libcrypto/bio/bio_lib.c
index 85eb0f0c772..51289ad2951 100644
--- a/lib/libcrypto/bio/bio_lib.c
+++ b/lib/libcrypto/bio/bio_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio_lib.c,v 1.31 2021/12/09 15:28:58 schwarze Exp $ */
+/* $OpenBSD: bio_lib.c,v 1.32 2022/01/05 20:22:26 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -589,6 +589,12 @@ BIO_next(BIO *b)
}
void
+BIO_set_next(BIO *b, BIO *next)
+{
+ b->next_bio = next;
+}
+
+void
BIO_free_all(BIO *bio)
{
BIO *b;