#include <openssl/bio.h>
#include "testutil.h"
+#ifndef OPENSSL_NO_DGRAM
static int test_dgram(void)
{
BIO *bio = BIO_new(BIO_s_dgram_mem()), *rbio = NULL;
if (!TEST_ptr(rbio))
goto err;
- /* Seeting the EOF return value on a non datagram mem BIO should be fine */
+ /* Setting the EOF return value on a non datagram mem BIO should be fine */
if (!TEST_int_gt(BIO_set_mem_eof_return(rbio, 0), 0))
goto err;
|| !TEST_true(BIO_should_retry(bio)))
goto err;
+ if (!TEST_int_eq(BIO_dgram_set_mtu(bio, 123456), 1)
+ || !TEST_int_eq(BIO_dgram_get_mtu(bio), 123456))
+ goto err;
+
testresult = 1;
err:
BIO_free(rbio);
BIO_free(bio);
return testresult;
}
-
+#endif
int setup_tests(void)
{
return 0;
}
+#ifndef OPENSSL_NO_DGRAM
ADD_TEST(test_dgram);
+#endif
return 1;
}