summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bf_null.c
diff options
context:
space:
mode:
authortb <>2022-01-14 08:40:57 +0000
committertb <>2022-01-14 08:40:57 +0000
commit7de4d3a68913b50be213d1f95ad168ee17570641 (patch)
treef4107fef050d8e49767a68206c4485731507efa2 /src/lib/libcrypto/bio/bf_null.c
parent11d03b6dcd305ef8269fb1b034e0f623f6d08d93 (diff)
downloadopenbsd-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_null.c')
-rw-r--r--src/lib/libcrypto/bio/bf_null.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bio/bf_null.c b/src/lib/libcrypto/bio/bf_null.c
index 1a935cf26b..129def8c99 100644
--- a/src/lib/libcrypto/bio/bf_null.c
+++ b/src/lib/libcrypto/bio/bf_null.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_null.c,v 1.13 2022/01/07 09:02:17 tb Exp $ */ 1/* $OpenBSD: bf_null.c,v 1.14 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 *
@@ -73,7 +73,7 @@ static int nullf_gets(BIO *h, char *str, int size);
73static long nullf_ctrl(BIO *h, int cmd, long arg1, void *arg2); 73static long nullf_ctrl(BIO *h, int cmd, long arg1, void *arg2);
74static int nullf_new(BIO *h); 74static int nullf_new(BIO *h);
75static int nullf_free(BIO *data); 75static int nullf_free(BIO *data);
76static long nullf_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); 76static long nullf_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
77 77
78static const BIO_METHOD methods_nullf = { 78static const BIO_METHOD methods_nullf = {
79 .type = BIO_TYPE_NULL_FILTER, 79 .type = BIO_TYPE_NULL_FILTER,
@@ -167,7 +167,7 @@ nullf_ctrl(BIO *b, int cmd, long num, void *ptr)
167} 167}
168 168
169static long 169static long
170nullf_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) 170nullf_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
171{ 171{
172 long ret = 1; 172 long ret = 1;
173 173