Re: OpenSSL s_server with GoodMorning message in clear text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El día martes, septiembre 26, 2023 a las 01:35:42 +0200, Tomas Mraz escribió:

> In s_client there is already the -starttls option that does this on the
> client side. So you could implement the -starttls option similarly on
> the server side.
> 
> Tomas Mraz, OpenSSL

I did a fast change, only for testing the idea, and it works fine:

diff -c apps/lib/s_socket.c.orig apps/lib/s_socket.c
*** apps/lib/s_socket.c.orig    2023-09-26 13:06:50.997732542 +0200
--- apps/lib/s_socket.c 2023-09-26 13:37:21.767996821 +0200
***************
*** 381,386 ****
--- 381,390 ----
                  break;
              }
              BIO_set_tcp_ndelay(sock, 1);
+           fprintf(stderr, "sending GoodMorning message to socket %d\n", sock);
+           fflush(stderr);
+ #define GM "220 SLNP OpenSSL@version:V7.3@user:sisis@pid:5234@charset:UTF-8@ssl:true\n"
+           write(sock, GM, strlen(GM));
              i = (*cb)(sock, type, protocol, context);

              /*

	matthias

-- 
Matthias Apitz, ✉ guru@xxxxxxxxxxx, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux