Skip to content

Commit

Permalink
Fix heartbeat_test for -DOPENSSL_NO_HEARTBEATS
Browse files Browse the repository at this point in the history
Replaces the entire test with a trivial implementation when
OPENSSL_NO_HEARTBEATS is defined.
  • Loading branch information
mbland committed May 22, 2014
1 parent eb33348 commit 647c70f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ssl/heartbeat_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#include <stdlib.h>
#include <string.h>

#ifndef OPENSSL_NO_HEARTBEATS

/* As per https://tools.ietf.org/html/rfc6520#section-4 */
#define MIN_PADDING_SIZE 16

Expand Down Expand Up @@ -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 */

0 comments on commit 647c70f

Please sign in to comment.