[Openvpn-devel] Do not print Diffy Hellman parameters file to log file

Message ID 20210317223448.1278818-1-tincanteksup@gmail.com
State Accepted
Delegated to: Antonio Quartulli
Headers show
Series [Openvpn-devel] Do not print Diffy Hellman parameters file to log file | expand

Commit Message

tincanteksup March 17, 2021, 11:34 a.m. UTC
Suppress printing the complete Diffy Hellman parameters file
to the log file when it has been configured as an inline file.

Signed-off-by: Richard Bonhomme <tincanteksup@gmail.com>
---
 src/openvpn/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Antonio Quartulli March 17, 2021, 11:57 a.m. UTC | #1
Hi,

On 17/03/2021 23:34, Richard Bonhomme wrote:
> Suppress printing the complete Diffy Hellman parameters file
> to the log file when it has been configured as an inline file.
> 
> Signed-off-by: Richard Bonhomme <tincanteksup@gmail.com>

This is indeed something that I forgot to change when implementing
19fab1f6cf71715f84d09d6a8b49698b0ae42cd1

Like all other params that have an xx_inline bool companion, also
dh_file should be printed using the SHOW_STR_INLINE() macro.

Thanks for noticing and fixing this!

Acked-by: Antonio Quartulli <antonio@openvpn.net>
Gert Doering March 17, 2021, 8:12 p.m. UTC | #2
Your patch has been applied to the master and release/2.5 branch.

I've corrected the spelling of "Diffy" to "Diffie", according to

  https://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange

I have not tested this further than "it compiles".

commit 4170da0778b926cea748c319163fdcfc7c6bc445 (master)
commit c8a72bbfbf16fa87c18c2e92c467587833b611e9 (release/2.5)
Author: Richard Bonhomme
Date:   Wed Mar 17 22:34:48 2021 +0000

     Do not print Diffy Hellman parameters file to log file

     Signed-off-by: Richard Bonhomme <tincanteksup@gmail.com>
     Acked-by: Antonio Quartulli <antonio@openvpn.net>
     Message-Id: <20210317223448.1278818-1-tincanteksup@gmail.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21688.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering
tincanteksup March 18, 2021, 4:12 a.m. UTC | #3
How embarrassing ..

On 18/03/2021 07:12, Gert Doering wrote:
> Your patch has been applied to the master and release/2.5 branch.
> 
> I've corrected the spelling of "Diffy" to "Diffie", according to
> 
>    https://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange
> 
> I have not tested this further than "it compiles".
> 
> commit 4170da0778b926cea748c319163fdcfc7c6bc445 (master)
> commit c8a72bbfbf16fa87c18c2e92c467587833b611e9 (release/2.5)
> Author: Richard Bonhomme
> Date:   Wed Mar 17 22:34:48 2021 +0000
> 
>       Do not print Diffy Hellman parameters file to log file
> 
>       Signed-off-by: Richard Bonhomme <tincanteksup@gmail.com>
>       Acked-by: Antonio Quartulli <antonio@openvpn.net>
>       Message-Id: <20210317223448.1278818-1-tincanteksup@gmail.com>
>       URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21688.html
>       Signed-off-by: Gert Doering <gert@greenie.muc.de>
> 
> 
> --
> kind regards,
> 
> Gert Doering
>

Patch

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 0eb049d8..3a2c7a10 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -1695,7 +1695,7 @@  show_settings(const struct options *o)
     SHOW_BOOL(tls_client);
     SHOW_STR_INLINE(ca_file);
     SHOW_STR(ca_path);
-    SHOW_STR(dh_file);
+    SHOW_STR_INLINE(dh_file);
 #ifdef ENABLE_MANAGEMENT
     if ((o->management_flags & MF_EXTERNAL_CERT))
     {