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/evp/bio_md.c | |
| 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/evp/bio_md.c')
| -rw-r--r-- | src/lib/libcrypto/evp/bio_md.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/evp/bio_md.c b/src/lib/libcrypto/evp/bio_md.c index a83088a963..4ae5f1f496 100644 --- a/src/lib/libcrypto/evp/bio_md.c +++ b/src/lib/libcrypto/evp/bio_md.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_md.c,v 1.17 2022/01/07 09:02:18 tb Exp $ */ | 1 | /* $OpenBSD: bio_md.c,v 1.18 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 | * |
| @@ -75,7 +75,7 @@ static int md_gets(BIO *h, char *str, int size); | |||
| 75 | static long md_ctrl(BIO *h, int cmd, long arg1, void *arg2); | 75 | static long md_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
| 76 | static int md_new(BIO *h); | 76 | static int md_new(BIO *h); |
| 77 | static int md_free(BIO *data); | 77 | static int md_free(BIO *data); |
| 78 | static long md_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); | 78 | static long md_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp); |
| 79 | 79 | ||
| 80 | static const BIO_METHOD methods_md = { | 80 | static const BIO_METHOD methods_md = { |
| 81 | .type = BIO_TYPE_MD, | 81 | .type = BIO_TYPE_MD, |
| @@ -241,7 +241,7 @@ md_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | static long | 243 | static long |
| 244 | md_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) | 244 | md_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) |
| 245 | { | 245 | { |
| 246 | long ret = 1; | 246 | long ret = 1; |
| 247 | 247 | ||
