summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-12-06 16:44:09 +0000
committerHugo Landau <hlandau@openssl.org>2023-02-22 05:34:04 +0000
commitf10e5885f01582c449eff8df70b61c916d9224cf (patch)
tree8aab3996dc831bdf9a5d592dc0c2ceaa73858d5d /ssl
parent6d1f6933595ea66c2e8367fef01e2824b4f3ce6b (diff)
Add a test for a server that doesn't provide transport params
Check that we fail if the server has failed to provide transport params. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20030)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/quic_tls.c9
-rw-r--r--ssl/quic/quic_tserver.c10
2 files changed, 12 insertions, 7 deletions
diff --git a/ssl/quic/quic_tls.c b/ssl/quic/quic_tls.c
index 5ce71a2e4f..088a59f28a 100644
--- a/ssl/quic/quic_tls.c
+++ b/ssl/quic/quic_tls.c
@@ -694,10 +694,15 @@ int ossl_quic_tls_tick(QUIC_TLS *qtls)
*/
SSL_set_bio(qtls->args.s, nullbio, nullbio);
- if (qtls->args.is_server)
+ if (qtls->args.is_server) {
SSL_set_accept_state(qtls->args.s);
- else
+ if (!SSL_set_num_tickets(qtls->args.s, 0)) {
+ qtls->inerror = 1;
+ return 0;
+ }
+ } else {
SSL_set_connect_state(qtls->args.s);
+ }
qtls->configured = 1;
}
diff --git a/ssl/quic/quic_tserver.c b/ssl/quic/quic_tserver.c
index 2a6049b134..444b59b746 100644
--- a/ssl/quic/quic_tserver.c
+++ b/ssl/quic/quic_tserver.c
@@ -153,11 +153,6 @@ int ossl_quic_tserver_tick(QUIC_TSERVER *srv)
return 1;
}
-int ossl_quic_tserver_is_connected(QUIC_TSERVER *srv)
-{
- return ossl_quic_channel_is_active(srv->ch);
-}
-
/* Returns 1 if the server is in any terminating or terminated state */
int ossl_quic_tserver_is_term_any(QUIC_TSERVER *srv,
QUIC_TERMINATE_CAUSE *cause)
@@ -172,6 +167,11 @@ int ossl_quic_tserver_is_terminated(QUIC_TSERVER *srv,
return ossl_quic_channel_is_terminated(srv->ch, cause);
}
+int ossl_quic_tserver_is_handshake_complete(QUIC_TSERVER *srv)
+{
+ return ossl_quic_channel_is_handshake_complete(srv->ch);
+}
+
int ossl_quic_tserver_read(QUIC_TSERVER *srv,
unsigned char *buf,
size_t buf_len,