Remove some redundant code from test helper BIOs
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22157)
This commit is contained in:
parent
0a2369fd44
commit
c29b13a735
@ -19,18 +19,6 @@ struct noisy_dgram_st {
|
||||
uint64_t delayed_dgram;
|
||||
};
|
||||
|
||||
static int noisy_dgram_read(BIO *bio, char *out, int outl)
|
||||
{
|
||||
/* We don't support this - not needed anyway */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int noisy_dgram_write(BIO *bio, const char *in, int inl)
|
||||
{
|
||||
/* We don't support this - not needed anyway */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static long noisy_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
|
||||
{
|
||||
long ret;
|
||||
@ -50,18 +38,6 @@ static long noisy_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int noisy_dgram_gets(BIO *bio, char *buf, int size)
|
||||
{
|
||||
/* We don't support this - not needed anyway */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int noisy_dgram_puts(BIO *bio, const char *str)
|
||||
{
|
||||
/* We don't support this - not needed anyway */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int noisy_dgram_sendmmsg(BIO *bio, BIO_MSG *msg, size_t stride,
|
||||
size_t num_msg, uint64_t flags,
|
||||
size_t *msgs_processed)
|
||||
@ -298,10 +274,6 @@ const BIO_METHOD *bio_f_noisy_dgram_filter(void)
|
||||
method_noisy_dgram = BIO_meth_new(BIO_TYPE_NOISY_DGRAM_FILTER,
|
||||
"Nosiy datagram filter");
|
||||
if (method_noisy_dgram == NULL
|
||||
|| !BIO_meth_set_write(method_noisy_dgram, noisy_dgram_write)
|
||||
|| !BIO_meth_set_read(method_noisy_dgram, noisy_dgram_read)
|
||||
|| !BIO_meth_set_puts(method_noisy_dgram, noisy_dgram_puts)
|
||||
|| !BIO_meth_set_gets(method_noisy_dgram, noisy_dgram_gets)
|
||||
|| !BIO_meth_set_ctrl(method_noisy_dgram, noisy_dgram_ctrl)
|
||||
|| !BIO_meth_set_sendmmsg(method_noisy_dgram, noisy_dgram_sendmmsg)
|
||||
|| !BIO_meth_set_recvmmsg(method_noisy_dgram, noisy_dgram_recvmmsg)
|
||||
|
@ -11,18 +11,6 @@
|
||||
#include "quictestlib.h"
|
||||
#include "../testutil.h"
|
||||
|
||||
static int pkt_split_dgram_read(BIO *bio, char *out, int outl)
|
||||
{
|
||||
/* We don't support this - not needed anyway */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int pkt_split_dgram_write(BIO *bio, const char *in, int inl)
|
||||
{
|
||||
/* We don't support this - not needed anyway */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static long pkt_split_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
|
||||
{
|
||||
long ret;
|
||||
@ -42,18 +30,6 @@ static long pkt_split_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int pkt_split_dgram_gets(BIO *bio, char *buf, int size)
|
||||
{
|
||||
/* We don't support this - not needed anyway */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int pkt_split_dgram_puts(BIO *bio, const char *str)
|
||||
{
|
||||
/* We don't support this - not needed anyway */
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int pkt_split_dgram_sendmmsg(BIO *bio, BIO_MSG *msg, size_t stride,
|
||||
size_t num_msg, uint64_t flags,
|
||||
size_t *msgs_processed)
|
||||
@ -149,10 +125,6 @@ const BIO_METHOD *bio_f_pkt_split_dgram_filter(void)
|
||||
method_pkt_split_dgram = BIO_meth_new(BIO_TYPE_PKT_SPLIT_DGRAM_FILTER,
|
||||
"Packet splitting datagram filter");
|
||||
if (method_pkt_split_dgram == NULL
|
||||
|| !BIO_meth_set_write(method_pkt_split_dgram, pkt_split_dgram_write)
|
||||
|| !BIO_meth_set_read(method_pkt_split_dgram, pkt_split_dgram_read)
|
||||
|| !BIO_meth_set_puts(method_pkt_split_dgram, pkt_split_dgram_puts)
|
||||
|| !BIO_meth_set_gets(method_pkt_split_dgram, pkt_split_dgram_gets)
|
||||
|| !BIO_meth_set_ctrl(method_pkt_split_dgram, pkt_split_dgram_ctrl)
|
||||
|| !BIO_meth_set_sendmmsg(method_pkt_split_dgram,
|
||||
pkt_split_dgram_sendmmsg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user