static char *cert = NULL;
static char *privkey = NULL;
+static unsigned int timer_cb_count;
#define NUM_TESTS 2
#define RECORD_SEQUENCE 10
+static unsigned int timer_cb(SSL *s, unsigned int timer_us)
+{
+ ++timer_cb_count;
+
+ if (timer_us == 0)
+ return 1000000;
+ else
+ return 2 * timer_us;
+}
+
static int test_dtls_unprocessed(int testidx)
{
SSL_CTX *sctx = NULL, *cctx = NULL;
BIO *c_to_s_fbio, *c_to_s_mempacket;
int testresult = 0;
+ timer_cb_count = 0;
+
if (!TEST_true(create_ssl_ctx_pair(DTLS_server_method(),
DTLS_client_method(), &sctx,
&cctx, cert, privkey)))
NULL, c_to_s_fbio)))
goto end;
+ DTLS_set_timer_cb(clientssl1, timer_cb);
+
if (testidx == 1)
certstatus[RECORD_SEQUENCE] = 0xff;
SSL_ERROR_NONE)))
goto end;
+ if (timer_cb_count == 0) {
+ printf("timer_callback was not called.\n");
+ goto end;
+ }
+
testresult = 1;
end:
SSL_free(serverssl1);