diff options
| author | tb <> | 2022-01-14 08:40:57 +0000 |
|---|---|---|
| committer | tb <> | 2022-01-14 08:40:57 +0000 |
| commit | bf7beecb6c75655f21958cd52426578df3f1f307 (patch) | |
| tree | f4107fef050d8e49767a68206c4485731507efa2 /src/lib/libcrypto/comp | |
| parent | 7d1004f306e7f866e13dd01c6e546fd35a43df41 (diff) | |
| download | openbsd-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/comp')
| -rw-r--r-- | src/lib/libcrypto/comp/c_zlib.c | 6 |
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); | |||
| 234 | static int bio_zlib_read(BIO *b, char *out, int outl); | 234 | static int bio_zlib_read(BIO *b, char *out, int outl); |
| 235 | static int bio_zlib_write(BIO *b, const char *in, int inl); | 235 | static int bio_zlib_write(BIO *b, const char *in, int inl); |
| 236 | static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr); | 236 | static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr); |
| 237 | static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp); | 237 | static long bio_zlib_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp); |
| 238 | 238 | ||
| 239 | static BIO_METHOD bio_meth_zlib = { | 239 | static 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 | ||
| 557 | static long | 557 | static long |
| 558 | bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) | 558 | bio_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; |
