From: tb Date: Wed, 5 Jan 2022 20:22:26 +0000 (+0000) Subject: Prepare to provide BIO_set_next(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=05505beb86b46bbe7644ab2cd4bf89845133ba1b;p=openbsd Prepare to provide BIO_set_next(). This will be needed in libssl and freerdp after the next bump. ok inoguchi jsing --- 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. * @@ -588,6 +588,12 @@ BIO_next(BIO *b) return b->next_bio; } +void +BIO_set_next(BIO *b, BIO *next) +{ + b->next_bio = next; +} + void BIO_free_all(BIO *bio) {