|
18 | 18 | * 02110-1301, USA. |
19 | 19 | */ |
20 | 20 |
|
| 21 | +#include <config.h> |
| 22 | + |
21 | 23 | #include <gnutls/abstract.h> |
22 | 24 | #include <sys/socket.h> |
23 | 25 | #include <linux/tls.h> |
|
26 | 28 | #include <unistd.h> |
27 | 29 | #include <glib.h> |
28 | 30 |
|
29 | | -#include "config.h" |
30 | 31 | #include "tlshd.h" |
31 | 32 |
|
32 | 33 | #ifdef HAVE_GNUTLS_QUIC |
@@ -106,7 +107,7 @@ static int quic_secret_func(gnutls_session_t session, gnutls_record_encryption_l |
106 | 107 | struct tlshd_quic_conn *conn = gnutls_session_get_ptr(session); |
107 | 108 | gnutls_cipher_algorithm_t type = gnutls_cipher_get(session); |
108 | 109 | struct quic_crypto_secret secret = {}; |
109 | | - int sockfd, ret, len = sizeof(secret); |
| 110 | + int sockfd, len = sizeof(secret); |
110 | 111 |
|
111 | 112 | if (conn->completed) |
112 | 113 | return 0; |
@@ -134,6 +135,8 @@ static int quic_secret_func(gnutls_session_t session, gnutls_record_encryption_l |
134 | 135 | } |
135 | 136 | if (secret.level == QUIC_CRYPTO_APP) { |
136 | 137 | if (conn->is_serv) { |
| 138 | + int ret; |
| 139 | + |
137 | 140 | ret = gnutls_session_ticket_send(session, 1, 0); |
138 | 141 | if (ret) { |
139 | 142 | tlshd_log_gnutls_error(ret); |
@@ -383,13 +386,14 @@ static int quic_handshake_recvmsg(int sockfd, struct tlshd_quic_msg *msg) |
383 | 386 | return ret; |
384 | 387 | } |
385 | 388 |
|
386 | | -static int quic_handshake_completed(struct tlshd_quic_conn *conn) |
| 389 | +static int quic_handshake_completed(const struct tlshd_quic_conn *conn) |
387 | 390 | { |
388 | 391 | return conn->completed || conn->errcode; |
389 | 392 | } |
390 | 393 |
|
391 | | -static int quic_handshake_crypto_data(struct tlshd_quic_conn *conn, uint8_t level, |
392 | | - const uint8_t *data, size_t datalen) |
| 394 | +static int quic_handshake_crypto_data(const struct tlshd_quic_conn *conn, |
| 395 | + uint8_t level, const uint8_t *data, |
| 396 | + size_t datalen) |
393 | 397 | { |
394 | 398 | gnutls_session_t session = conn->session; |
395 | 399 | int ret; |
|
0 commit comments