GH371: Print debug info for ALPN extension
[openssl.git] / apps / s_cb.c
index 35366c567569b9463bbb5ab8182d5a24005feec0..07ce997081951005ca7236d44e54c2fdce96b5b5 100644 (file)
 /* callback functions used by s_client, s_server, and s_time */
 #include <stdio.h>
 #include <stdlib.h>
-#include <assert.h>
 #include <string.h> /* for memcpy() and strcmp() */
 #define USE_SOCKETS
 #include "apps.h"
@@ -289,7 +288,6 @@ static STRINT_PAIR cert_type_list[] = {
     {"ECDSA sign", TLS_CT_ECDSA_SIGN},
     {"RSA fixed ECDH", TLS_CT_RSA_FIXED_ECDH},
     {"ECDSA fixed ECDH", TLS_CT_ECDSA_FIXED_ECDH},
-    {"GOST94 Sign", TLS_CT_GOST94_SIGN},
     {"GOST01 Sign", TLS_CT_GOST01_SIGN},
     {NULL}
 };
@@ -712,6 +710,10 @@ static STRINT_PAIR tlsext_types[] = {
 #endif
 #ifdef TLSEXT_TYPE_encrypt_then_mac
     {"encrypt-then-mac", TLSEXT_TYPE_encrypt_then_mac},
+#endif
+#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
+    {"application layer protocol negotiation",
+     TLSEXT_TYPE_application_layer_protocol_negotiation},
 #endif
     {NULL}
 };
@@ -931,8 +933,9 @@ static int set_cert_cb(SSL *ssl, void *arg)
     static int retry_cnt;
     if (retry_cnt < 5) {
         retry_cnt++;
-        fprintf(stderr, "Certificate callback retry test: count %d\n",
-                retry_cnt);
+        BIO_printf(bio_err,
+                   "Certificate callback retry test: count %d\n",
+                   retry_cnt);
         return -1;
     }
 #endif