diff options
author | Matt Caswell <matt@openssl.org> | 2016-03-21 15:32:40 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-03-21 16:33:59 +0000 |
commit | f9e550341281b0d344f7a5e7ac2ace79f88a3184 (patch) | |
tree | 92d80d122c6d3c1eee39ffdd08cfe1980a657095 /test/dtlsv1listentest.c | |
parent | 168c3b737e898ce97348dfe77ef176e39ae9da0d (diff) |
Fix no-sock
Misc fixes for no-sock
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/dtlsv1listentest.c')
-rw-r--r-- | test/dtlsv1listentest.c | 15 |
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 } - |