| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#include "error/s2n_errno.h" |
| 17 |
#include "stuffer/s2n_stuffer.h" |
| 18 |
#include "tls/extensions/s2n_extension_list.h" |
| 19 |
#include "tls/s2n_tls.h" |
| 20 |
#include "tls/s2n_tls13.h" |
| 21 |
#include "utils/s2n_safety.h" |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
int s2n_encrypted_extensions_send(struct s2n_connection *conn) |
| 36 |
{ |
| 37 |
POSIX_ENSURE_REF(conn); |
| 38 |
POSIX_ENSURE(conn->actual_protocol_version >= S2N_TLS13, S2N_ERR_BAD_MESSAGE); |
| 39 |
|
| 40 |
struct s2n_stuffer *out = &conn->handshake.io; |
| 41 |
POSIX_GUARD(s2n_extension_list_send(S2N_EXTENSION_LIST_ENCRYPTED_EXTENSIONS, conn, out)); |
| 42 |
return S2N_SUCCESS; |
| 43 |
} |
| 44 |
|
| 45 |
int s2n_encrypted_extensions_recv(struct s2n_connection *conn) |
| 46 |
{ |
| 47 |
POSIX_ENSURE_REF(conn); |
| 48 |
POSIX_ENSURE(conn->actual_protocol_version >= S2N_TLS13, S2N_ERR_BAD_MESSAGE); |
| 49 |
|
| 50 |
struct s2n_stuffer *in = &conn->handshake.io; |
| 51 |
POSIX_GUARD(s2n_extension_list_recv(S2N_EXTENSION_LIST_ENCRYPTED_EXTENSIONS, conn, in)); |
| 52 |
return S2N_SUCCESS; |
| 53 |
} |