MINOR: quic: Set "no_application_protocol" alert
We set this TLS error when no application protocol could be negotiated
via the TLS callback concerned. It is converted as a QUIC CRYPTO_ERROR
error (0x178).
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index e3e3abf..ffbfa50 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -1977,6 +1977,12 @@
if (SSL_select_next_proto((unsigned char**) out, outlen, (const unsigned char *)conf->alpn_str,
conf->alpn_len, server, server_len) != OPENSSL_NPN_NEGOTIATED) {
+#ifdef USE_QUIC
+ struct connection *conn = SSL_get_ex_data(s, ssl_app_data_index);
+
+ if (conn->qc)
+ quic_set_tls_alert(conn->qc, SSL_AD_NO_APPLICATION_PROTOCOL);
+#endif
return SSL_TLSEXT_ERR_NOACK;
}
return SSL_TLSEXT_ERR_OK;