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/evp/bio_b64.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/evp/bio_b64.c')
-rw-r--r-- | src/lib/libcrypto/evp/bio_b64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c index c1ec25d9c4..b61a342a3e 100644 --- a/src/lib/libcrypto/evp/bio_b64.c +++ b/src/lib/libcrypto/evp/bio_b64.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio_b64.c,v 1.24 2022/01/07 09:02:18 tb Exp $ */ | 1 | /* $OpenBSD: bio_b64.c,v 1.25 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 b64_puts(BIO *h, const char *str); | |||
73 | static long b64_ctrl(BIO *h, int cmd, long arg1, void *arg2); | 73 | static long b64_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
74 | static int b64_new(BIO *h); | 74 | static int b64_new(BIO *h); |
75 | static int b64_free(BIO *data); | 75 | static int b64_free(BIO *data); |
76 | static long b64_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); | 76 | static long b64_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp); |
77 | #define B64_BLOCK_SIZE 1024 | 77 | #define B64_BLOCK_SIZE 1024 |
78 | #define B64_BLOCK_SIZE2 768 | 78 | #define B64_BLOCK_SIZE2 768 |
79 | #define B64_NONE 0 | 79 | #define B64_NONE 0 |
@@ -550,7 +550,7 @@ again: | |||
550 | } | 550 | } |
551 | 551 | ||
552 | static long | 552 | static long |
553 | b64_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) | 553 | b64_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) |
554 | { | 554 | { |
555 | long ret = 1; | 555 | long ret = 1; |
556 | 556 | ||