summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/s_server.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index a112b01f1b..c5d9221e90 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -130,6 +130,17 @@ static unsigned int psk_server_cb(SSL *ssl, const char *identity,
if (s_debug)
BIO_printf(bio_s_out, "psk_server_cb\n");
+
+ if (SSL_version(ssl) >= TLS1_3_VERSION) {
+ /*
+ * This callback is designed for use in TLSv1.2. It is possible to use
+ * a single callback for all protocol versions - but it is preferred to
+ * use a dedicated callback for TLSv1.3. For TLSv1.3 we have
+ * psk_find_session_cb.
+ */
+ return 0;
+ }
+
if (identity == NULL) {
BIO_printf(bio_err, "Error: client did not send PSK identity\n");
goto out_err;