summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtests/ssl_gtest/ssl_extension_unittest.cc1
-rw-r--r--lib/ssl/ssl3con.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/gtests/ssl_gtest/ssl_extension_unittest.cc b/gtests/ssl_gtest/ssl_extension_unittest.cc
index 6e3f2a538..08eb3cb02 100644
--- a/gtests/ssl_gtest/ssl_extension_unittest.cc
+++ b/gtests/ssl_gtest/ssl_extension_unittest.cc
@@ -326,6 +326,7 @@ TEST_P(TlsExtensionTestGeneric, AlpnMismatch) {
server_->EnableAlpn(server_alpn, sizeof(server_alpn));
ClientHelloErrorTest(nullptr, kTlsAlertNoApplicationProtocol);
+ client_->CheckErrorCode(SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL);
}
TEST_P(TlsExtensionTestGeneric, AlpnDisabledServer) {
diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c
index aa419bc37..ad7480586 100644
--- a/lib/ssl/ssl3con.c
+++ b/lib/ssl/ssl3con.c
@@ -3136,6 +3136,9 @@ ssl3_HandleAlert(sslSocket *ss, sslBuffer *buf)
case bad_certificate_hash_value:
error = SSL_ERROR_BAD_CERT_HASH_VALUE_ALERT;
break;
+ case no_application_protocol:
+ error = SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL;
+ break;
case ech_required:
error = SSL_ERROR_ECH_REQUIRED_ALERT;
break;