summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-08-09 17:46:32 +0100
committerHugo Landau <hlandau@openssl.org>2023-09-01 10:45:33 +0100
commit881e3299dcadd65cc4a2843ba47abc6548ced8f4 (patch)
tree0456fef69d23abb31cb9d3eee50ac8b58b0f535f /ssl
parentda57c0eaf22c390f9b38c42ca1bd7daca4effd2f (diff)
QUIC TLS: Better error message when ALPN not used
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21715)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/quic_tls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/quic/quic_tls.c b/ssl/quic/quic_tls.c
index 8b9f812253..b0da216e37 100644
--- a/ssl/quic/quic_tls.c
+++ b/ssl/quic/quic_tls.c
@@ -672,8 +672,8 @@ static int raise_error(QUIC_TLS *qtls, uint64_t error_code,
ERR_new();
ERR_set_debug(src_file, src_line, src_func);
ERR_set_error(ERR_LIB_SSL, SSL_R_QUIC_HANDSHAKE_LAYER_ERROR,
- "handshake layer error, error code %llu (\"%s\")",
- (unsigned long long)error_code, error_msg);
+ "handshake layer error, error code %llu (0x%llx) (\"%s\")",
+ error_code, error_code, error_msg);
OSSL_ERR_STATE_save_to_mark(qtls->error_state);
/*
@@ -743,7 +743,8 @@ int ossl_quic_tls_tick(QUIC_TLS *qtls)
return RAISE_INTERNAL_ERROR(qtls);
} else {
if (sc->ext.alpn == NULL || sc->ext.alpn_len == 0)
- return RAISE_INTERNAL_ERROR(qtls);
+ return RAISE_ERROR(qtls, QUIC_ERR_CRYPTO_NO_APP_PROTO,
+ "ALPN must be configured when using QUIC");
}
if (!SSL_set_min_proto_version(qtls->args.s, TLS1_3_VERSION))
return RAISE_INTERNAL_ERROR(qtls);