diff --git a/tests/api.c b/tests/api.c index 5d3c21a5c..d31cb3951 100644 --- a/tests/api.c +++ b/tests/api.c @@ -6510,7 +6510,10 @@ static THREAD_RETURN WOLFSSL_THREAD run_wolfssl_server(void* args) wolfSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack); #endif #if defined(WOLFSSL_SESSION_EXPORT) && defined(WOLFSSL_DTLS) - AssertIntEQ(WOLFSSL_SUCCESS, wolfSSL_CTX_dtls_set_export(ctx, test_export)); + if (callbacks->method == wolfDTLSv1_2_server_method) { + AssertIntEQ(WOLFSSL_SUCCESS, + wolfSSL_CTX_dtls_set_export(ctx, test_export)); + } #endif