| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#include <utils/s2n_socket.h> |
| 10 |
#include <cbmc_proof/make_common_datastructures.h> |
| 11 |
|
| 12 |
#include <assert.h> |
| 13 |
|
| 14 |
void s2n_socket_quickack_harness() |
| 15 |
{ |
| 16 |
|
| 17 |
struct s2n_connection *s2n_connection = malloc(sizeof(*s2n_connection)); |
| 18 |
if (s2n_connection != NULL) { |
| 19 |
s2n_connection->recv_io_context = cbmc_allocate_s2n_socket_read_io_context(); |
| 20 |
} |
| 21 |
|
| 22 |
|
| 23 |
int result = s2n_socket_quickack(s2n_connection); |
| 24 |
|
| 25 |
|
| 26 |
assert(S2N_IMPLIES(result == S2N_SUCCESS, (!s2n_connection->managed_recv_io) || (s2n_connection->recv_io_context) != NULL)); |
| 27 |
} |