MINOR: ssl_crtlist: dump "no-alpn" on "show crtlist" when "no-alpn" was set
authorWilly Tarreau <w@1wt.eu>
Wed, 19 Apr 2023 07:07:47 +0000 (09:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Apr 2023 07:12:43 +0000 (09:12 +0200)
Instead of dumping "alpn " better show "no-alpn" as configured.

src/ssl_crtlist.c

index 5296118..741e6ae 100644 (file)
@@ -827,7 +827,10 @@ static void dump_crtlist_sslconf(struct buffer *buf, const struct ssl_bind_conf
                int comma = 0;
 
                if (space) chunk_appendf(buf, " ");
-               chunk_appendf(buf, "alpn ");
+               if (len)
+                       chunk_appendf(buf, "alpn ");
+               else
+                       chunk_appendf(buf, "no-alpn");
                while (len) {
                        unsigned short size;