| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#include "tls/extensions/s2n_cert_status_response.h" |
| 17 |
|
| 18 |
#include "stuffer/s2n_stuffer.h" |
| 19 |
#include "tls/s2n_connection.h" |
| 20 |
#include "tls/s2n_tls.h" |
| 21 |
#include "tls/s2n_tls_parameters.h" |
| 22 |
|
| 23 |
static bool s2n_cert_status_response_should_send(struct s2n_connection *conn); |
| 24 |
static int s2n_cert_status_response_recv(struct s2n_connection *conn, struct s2n_stuffer *extension); |
| 25 |
|
| 26 |
const s2n_extension_type s2n_cert_status_response_extension = { |
| 27 |
.iana_value = TLS_EXTENSION_STATUS_REQUEST, |
| 28 |
.is_response = true, |
| 29 |
.send = s2n_extension_send_noop, |
| 30 |
.recv = s2n_cert_status_response_recv, |
| 31 |
.should_send = s2n_cert_status_response_should_send, |
| 32 |
.if_missing = s2n_extension_noop_if_missing, |
| 33 |
}; |
| 34 |
|
| 35 |
static bool s2n_cert_status_response_should_send(struct s2n_connection *conn) |
| 36 |
{ |
| 37 |
return s2n_server_can_send_ocsp(conn); |
| 38 |
} |
| 39 |
|
| 40 |
int s2n_cert_status_response_recv(struct s2n_connection *conn, struct s2n_stuffer *extension) |
| 41 |
{ |
| 42 |
|
| 43 |
POSIX_ENSURE_REF(conn); |
| 44 |
conn->status_type = S2N_STATUS_REQUEST_OCSP; |
| 45 |
return S2N_SUCCESS; |
| 46 |
} |