summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2022-01-05 20:48:44 +0000
committertb <>2022-01-05 20:48:44 +0000
commiteef6ddcccaf5fe42f6d86ba338a40717dad95c4c (patch)
tree5d6617eefc61f117277eec6cdb75fbe4dc49cd4c /src/lib
parenteec5bb5de6de08ddb9bb4b14098bdf74403b758a (diff)
downloadopenbsd-eef6ddcccaf5fe42f6d86ba338a40717dad95c4c.tar.gz
openbsd-eef6ddcccaf5fe42f6d86ba338a40717dad95c4c.tar.bz2
openbsd-eef6ddcccaf5fe42f6d86ba338a40717dad95c4c.zip
Prepare to provide BIO_set_retry_reason()
Needed by freerdp. ok inoguchi jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/bio/bio.h5
-rw-r--r--src/lib/libcrypto/bio/bio_lib.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index 9697c8ad3b..23d47367d4 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.49 2022/01/05 20:22:26 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.50 2022/01/05 20:48:44 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 *
@@ -637,6 +637,9 @@ void BIO_set_next(BIO *b, BIO *next);
637#endif 637#endif
638BIO * BIO_get_retry_BIO(BIO *bio, int *reason); 638BIO * BIO_get_retry_BIO(BIO *bio, int *reason);
639int BIO_get_retry_reason(BIO *bio); 639int BIO_get_retry_reason(BIO *bio);
640#if defined(LIBRESSL_OPAQUE_BIO) || defined(LIBRESSL_CRYPTO_INTERNAL)
641void BIO_set_retry_reason(BIO *bio, int reason);
642#endif
640BIO * BIO_dup_chain(BIO *in); 643BIO * BIO_dup_chain(BIO *in);
641 644
642int BIO_nread0(BIO *bio, char **buf); 645int BIO_nread0(BIO *bio, char **buf);
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c
index 51289ad295..f129062d6e 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.32 2022/01/05 20:22:26 tb Exp $ */ 1/* $OpenBSD: bio_lib.c,v 1.33 2022/01/05 20:48:44 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 *
@@ -558,6 +558,12 @@ BIO_get_retry_reason(BIO *bio)
558 return (bio->retry_reason); 558 return (bio->retry_reason);
559} 559}
560 560
561void
562BIO_set_retry_reason(BIO *bio, int reason)
563{
564 bio->retry_reason = reason;
565}
566
561BIO * 567BIO *
562BIO_find_type(BIO *bio, int type) 568BIO_find_type(BIO *bio, int type)
563{ 569{