Fix for CVE-2014-0224
[openssl.git] / ssl / heartbeat_test.c
index a525d17f34065109b9e73d8110cbb424414e2f0d..eddadbe695a6b6f33b34bf7ceb67f73ea6bcee6c 100644 (file)
@@ -44,6 +44,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#if !defined(OPENSSL_NO_HEARTBEATS) && !defined(OPENSSL_SYS_WINDOWS)
+
 /* As per https://tools.ietf.org/html/rfc6520#section-4 */
 #define MIN_PADDING_SIZE       16
 
@@ -453,3 +455,11 @@ int main(int argc, char *argv[])
                }
        return EXIT_SUCCESS;
        }
+
+#else /* OPENSSL_NO_HEARTBEATS*/
+
+int main(int argc, char *argv[])
+       {
+               return EXIT_SUCCESS;
+       }
+#endif /* OPENSSL_NO_HEARTBEATS */