summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp
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/comp
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/comp')
-rw-r--r--src/lib/libcrypto/comp/c_zlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/comp/c_zlib.c b/src/lib/libcrypto/comp/c_zlib.c
index 4c527d57de..bdcd7e0f35 100644
--- a/src/lib/libcrypto/comp/c_zlib.c
+++ b/src/lib/libcrypto/comp/c_zlib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_zlib.c,v 1.21 2022/01/09 23:50:10 tb Exp $ */ 1/* $OpenBSD: c_zlib.c,v 1.22 2022/01/14 08:40:57 tb Exp $ */
2#include <stdio.h> 2#include <stdio.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#include <string.h> 4#include <string.h>
@@ -234,7 +234,7 @@ static int bio_zlib_free(BIO *bi);
234static int bio_zlib_read(BIO *b, char *out, int outl); 234static int bio_zlib_read(BIO *b, char *out, int outl);
235static int bio_zlib_write(BIO *b, const char *in, int inl); 235static int bio_zlib_write(BIO *b, const char *in, int inl);
236static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr); 236static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr);
237static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp); 237static long bio_zlib_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
238 238
239static BIO_METHOD bio_meth_zlib = { 239static BIO_METHOD bio_meth_zlib = {
240 .type = BIO_TYPE_COMP, 240 .type = BIO_TYPE_COMP,
@@ -555,7 +555,7 @@ bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
555 555
556 556
557static long 557static long
558bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) 558bio_zlib_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
559{ 559{
560 if (!b->next_bio) 560 if (!b->next_bio)
561 return 0; 561 return 0;