summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bf_buff.c
diff options
context:
space:
mode:
authortb <>2022-01-14 08:40:57 +0000
committertb <>2022-01-14 08:40:57 +0000
commitbf7beecb6c75655f21958cd52426578df3f1f307 (patch)
treef4107fef050d8e49767a68206c4485731507efa2 /src/lib/libcrypto/bio/bf_buff.c
parent7d1004f306e7f866e13dd01c6e546fd35a43df41 (diff)
downloadopenbsd-bf7beecb6c75655f21958cd52426578df3f1f307.tar.gz
openbsd-bf7beecb6c75655f21958cd52426578df3f1f307.tar.bz2
openbsd-bf7beecb6c75655f21958cd52426578df3f1f307.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_buff.c')
-rw-r--r--src/lib/libcrypto/bio/bf_buff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bio/bf_buff.c b/src/lib/libcrypto/bio/bf_buff.c
index 42414bb51a..aa079c5f9e 100644
--- a/src/lib/libcrypto/bio/bf_buff.c
+++ b/src/lib/libcrypto/bio/bf_buff.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_buff.c,v 1.26 2022/01/07 09:02:17 tb Exp $ */ 1/* $OpenBSD: bf_buff.c,v 1.27 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 *
@@ -72,7 +72,7 @@ static int buffer_gets(BIO *h, char *str, int size);
72static long buffer_ctrl(BIO *h, int cmd, long arg1, void *arg2); 72static long buffer_ctrl(BIO *h, int cmd, long arg1, void *arg2);
73static int buffer_new(BIO *h); 73static int buffer_new(BIO *h);
74static int buffer_free(BIO *data); 74static int buffer_free(BIO *data);
75static long buffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); 75static long buffer_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
76#define DEFAULT_BUFFER_SIZE 4096 76#define DEFAULT_BUFFER_SIZE 4096
77 77
78static const BIO_METHOD methods_buffer = { 78static const BIO_METHOD methods_buffer = {
@@ -452,7 +452,7 @@ malloc_error:
452} 452}
453 453
454static long 454static long
455buffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) 455buffer_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
456{ 456{
457 long ret = 1; 457 long ret = 1;
458 458