diff options
author | tb <> | 2022-01-14 08:40:57 +0000 |
---|---|---|
committer | tb <> | 2022-01-14 08:40:57 +0000 |
commit | 7de4d3a68913b50be213d1f95ad168ee17570641 (patch) | |
tree | f4107fef050d8e49767a68206c4485731507efa2 /src/lib/libcrypto/bio/bf_nbio.c | |
parent | 11d03b6dcd305ef8269fb1b034e0f623f6d08d93 (diff) | |
download | openbsd-7de4d3a68913b50be213d1f95ad168ee17570641.tar.gz openbsd-7de4d3a68913b50be213d1f95ad168ee17570641.tar.bz2 openbsd-7de4d3a68913b50be213d1f95ad168ee17570641.zip |
Implement new-style OpenSSL BIO callbacks
This provides support for new-style BIO callbacks in
BIO_{read,write,gets,puts}() and a helper function to
work out whether it should call the new or the old
style callback. It also adds a few typedefs and minor
code cleanup as well as the BIO_{get,set}_callback_ex()
from jsing, ok tb
Diffstat (limited to 'src/lib/libcrypto/bio/bf_nbio.c')
-rw-r--r-- | src/lib/libcrypto/bio/bf_nbio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bio/bf_nbio.c b/src/lib/libcrypto/bio/bf_nbio.c index c0a5ab2bcb..086479ec4c 100644 --- a/src/lib/libcrypto/bio/bf_nbio.c +++ b/src/lib/libcrypto/bio/bf_nbio.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bf_nbio.c,v 1.21 2022/01/07 09:02:17 tb Exp $ */ | 1 | /* $OpenBSD: bf_nbio.c,v 1.22 2022/01/14 08:40:57 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 | * |
@@ -74,7 +74,7 @@ static int nbiof_gets(BIO *h, char *str, int size); | |||
74 | static long nbiof_ctrl(BIO *h, int cmd, long arg1, void *arg2); | 74 | static long nbiof_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
75 | static int nbiof_new(BIO *h); | 75 | static int nbiof_new(BIO *h); |
76 | static int nbiof_free(BIO *data); | 76 | static int nbiof_free(BIO *data); |
77 | static long nbiof_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); | 77 | static long nbiof_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp); |
78 | 78 | ||
79 | typedef struct nbio_test_st { | 79 | typedef struct nbio_test_st { |
80 | /* only set if we sent a 'should retry' error */ | 80 | /* only set if we sent a 'should retry' error */ |
@@ -223,7 +223,7 @@ nbiof_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
223 | } | 223 | } |
224 | 224 | ||
225 | static long | 225 | static long |
226 | nbiof_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) | 226 | nbiof_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) |
227 | { | 227 | { |
228 | long ret = 1; | 228 | long ret = 1; |
229 | 229 | ||