X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Fdtlsv1listentest.c;h=6eb2e5ccfbb8abae301d5317ae3792884b80beb7;hp=6eef1b5e4ebd7e7c5e0517fb069c52ac3d8a9a5f;hb=f9e550341281b0d344f7a5e7ac2ace79f88a3184;hpb=168c3b737e898ce97348dfe77ef176e39ae9da0d 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 } -