summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-01-05 20:48:45 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-01-05 20:48:45 +0000
commit4c77902173ef9a0b3ac266b8080b2fdfd4e383ac (patch)
treeb55549a6769430cae59bf6c0e41c8d7475108e03
parentd066df9be6191341f5e8872d25aa8766dbd01562 (diff)
Prepare to provide BIO_set_retry_reason()
Needed by freerdp. 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 9697c8ad3b9..23d47367d43 100644
--- a/lib/libcrypto/bio/bio.h
+++ b/lib/libcrypto/bio/bio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio.h,v 1.49 2022/01/05 20:22:26 tb Exp $ */
+/* $OpenBSD: bio.h,v 1.50 2022/01/05 20:48:44 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -637,6 +637,9 @@ 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);
+#if defined(LIBRESSL_OPAQUE_BIO) || defined(LIBRESSL_CRYPTO_INTERNAL)
+void BIO_set_retry_reason(BIO *bio, int reason);
+#endif
BIO * BIO_dup_chain(BIO *in);
int BIO_nread0(BIO *bio, char **buf);
diff --git a/lib/libcrypto/bio/bio_lib.c b/lib/libcrypto/bio/bio_lib.c
index 51289ad2951..f129062d6e1 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.32 2022/01/05 20:22:26 tb Exp $ */
+/* $OpenBSD: bio_lib.c,v 1.33 2022/01/05 20:48:44 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -558,6 +558,12 @@ BIO_get_retry_reason(BIO *bio)
return (bio->retry_reason);
}
+void
+BIO_set_retry_reason(BIO *bio, int reason)
+{
+ bio->retry_reason = reason;
+}
+
BIO *
BIO_find_type(BIO *bio, int type)
{