aboutsummaryrefslogtreecommitdiffstats
path: root/test/dtlsv1listentest.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/dtlsv1listentest.c')
-rw-r--r--test/dtlsv1listentest.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/dtlsv1listentest.c b/test/dtlsv1listentest.c
index 6eef1b5e4e..6eb2e5ccfb 100644
--- a/test/dtlsv1listentest.c
+++ b/test/dtlsv1listentest.c
@@ -65,6 +65,8 @@
#endif
#include "e_os.h"
+#ifndef OPENSSL_NO_SOCK
+
/* Just a ClientHello without a cookie */
static const unsigned char clienthello_nocookie[] = {
0x16, /* Handshake */
@@ -339,7 +341,7 @@ static struct {
}
};
-#define COOKIE_LEN 20
+# define COOKIE_LEN 20
static int cookie_gen(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len)
{
@@ -368,9 +370,11 @@ static int cookie_verify(SSL *ssl, const unsigned char *cookie,
return 1;
}
+#endif
int main(void)
{
+#ifndef OPENSSL_NO_SOCK
SSL_CTX *ctx = NULL;
SSL *ssl = NULL;
BIO *outbio = NULL;
@@ -459,9 +463,12 @@ int main(void)
SSL_CTX_free(ctx);
BIO_free(inbio);
OPENSSL_free(peer);
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+# ifndef OPENSSL_NO_CRYPTO_MDEBUG
CRYPTO_mem_leaks_fp(stderr);
-#endif
+# endif
return success ? 0 : 1;
+#else
+ printf("DTLSv1_listen() is not supported by this build - skipping\n");
+ return 0;
+#endif
}
-