diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-05-24 18:15:57 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-05-26 17:18:34 +0200 |
commit | 0800318a0c1f80ed838838951b0478cb977d40a6 (patch) | |
tree | 686267909ca13431b484c0c8e5a9a09fcc1b4537 /include | |
parent | 022411112dd19420f0df51818322a216d914a0fb (diff) |
Deprecate old style BIO callback calls
New style BIO_debug_callback_ex() function added to provide
replacement for BIO_debug_callback().
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15440)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/bio.h.in | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/openssl/bio.h.in b/include/openssl/bio.h.in index 4e2fbb5f07..2c65b7e1a7 100644 --- a/include/openssl/bio.h.in +++ b/include/openssl/bio.h.in @@ -271,16 +271,23 @@ void BIO_clear_flags(BIO *b, int flags); # define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN)) # define BIO_cb_post(a) ((a)&BIO_CB_RETURN) +# ifndef OPENSSL_NO_DEPRECATED_3_0 typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi, long argl, long ret); +OSSL_DEPRECATEDIN_3_0 BIO_callback_fn BIO_get_callback(const BIO *b); +OSSL_DEPRECATEDIN_3_0 void BIO_set_callback(BIO *b, BIO_callback_fn callback); +OSSL_DEPRECATEDIN_3_0 long BIO_debug_callback(BIO *bio, int cmd, + const char *argp, int argi, + long argl, long ret); +# endif + typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp, size_t len, int argi, long argl, int ret, size_t *processed); -BIO_callback_fn BIO_get_callback(const BIO *b); -void BIO_set_callback(BIO *b, BIO_callback_fn callback); - BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b); void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback); +long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len, + int argi, long argl, int ret, size_t *processed); char *BIO_get_callback_arg(const BIO *b); void BIO_set_callback_arg(BIO *b, char *arg); @@ -634,9 +641,6 @@ int BIO_nread(BIO *bio, char **buf, int num); int BIO_nwrite0(BIO *bio, char **buf); int BIO_nwrite(BIO *bio, char **buf, int num); -long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, - long argl, long ret); - const BIO_METHOD *BIO_s_mem(void); const BIO_METHOD *BIO_s_secmem(void); BIO *BIO_new_mem_buf(const void *buf, int len); |