Skip to contentSkip to conversation

tls-crypt: avoid warnings when --disable-crypto is used

PATCH In review Antonio Quartulli 3 participants 3 messages Jul 7, 2017 – Jul 25, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tls-crypt: avoid warnings when --disable-crypto is used

From: Antonio Quartulli <[email protected]...>

Avoid including the content of tls_crypt.h when --disable-crypto is used, as it will trigger some warnings due to missing structures declarations.

---

- also checked via travis-ci.org

 src/openvpn/tls_crypt.h | 4 ++++
 1 file changed, 4 insertions(+)
src/openvpn/tls_crypt.h +4 -0
index e8080df9..4071ac94 100644
@@ -74,6 +74,8 @@
 #ifndef TLSCRYPT_H
 #define TLSCRYPT_H
 
+#ifdef ENABLE_CRYPTO
+
 #include "buffer.h"
 #include "crypto.h"
 #include "session_id.h"
@@ -140,4 +142,6 @@ bool tls_crypt_unwrap(const struct buffer *src, struct buffer *dst,
 
 /** @} */
 
+#endif /* ENABLE_CRYPTO */
+
 #endif /* TLSCRYPT_H */
Signature · 1 line
2.13.2
#1 lore raw

Hi,

Quoted 29 lines · Antonio Quartulli

From: Antonio Quartulli <[email protected]...>

Avoid including the content of tls_crypt.h when --disable-crypto is used, as it will trigger some warnings due to missing structures declarations.

---

- also checked via travis-ci.org

 src/openvpn/tls_crypt.h | 4 ++++
 1 file changed, 4 insertions(+)
src/openvpn/tls_crypt.h +2 -0
index e8080df9..4071ac94 100644
@@ -74,6 +74,8 @@
 #ifndef TLSCRYPT_H
 #define TLSCRYPT_H
 
+#ifdef ENABLE_CRYPTO
+
 #include "buffer.h"
 #include "crypto.h"
 #include "session_id.h"

src/openvpn/tls_crypt.h bool tls_crypt_unwrap(const struct buffer *src, struct buffer *dst, · line 147

Quoted 6 lines
src/openvpn/tls_crypt.h +2 -0
@@ -140,4 +142,6 @@ bool tls_crypt_unwrap(const struct buffer *src, struct buffer *dst,
 
 /** @} */
 
+#endif /* ENABLE_CRYPTO */
+
 #endif /* TLSCRYPT_H */

ACK

(This is quite similar to the fix I have in my tls-crypt-v2 tree:
https://github.com/syzzer/openvpn/commit/ba30a88e, so can't agree more ;-) )

-Steffan

#2 lore raw
In reply to Antonio Quartulli

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK as well. Tested with --disable-crypto and no tls-crypt.c compiler complaints any more.

Your patch has been applied to the following branches

commit 2dfbf62b6ace1eb39f1ae7126bc5530a541bed58 (master) commit 8295f62f84be3dbc5203b9695d99a4f74fcb7295 (release/2.4)

Author: Antonio Quartulli
Date:   Fri Jul 7 18:22:38 2017 +0800
     tls-crypt: avoid warnings when --disable-crypto is used

     Signed-off-by: Antonio Quartulli <[email protected]...>
     Acked-by: Steffan Karger <[email protected]...>
     Acked-by: David Sommerseth <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg15014.html
     Signed-off-by: David Sommerseth <[email protected]...>

- --
kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCgAGBQJZd2K5AAoJEIbPlEyWcf3ysZgP/3yh9FM0DsTOYJ0XGNZRzrHO kHZfzkqLidjdsZMHKcp7UNtV9YgV2++vUbAptGZBC6ECLoHZHblPRUK4CrFFwL4d ErvGBu4k3+3hz6SApGi62dUHBguT2gPAiF2bIHhWUy1yOQfF/3ycSZaWz/hVml1a UF2hRUCCdObERP3Ho61LlCKeV+1HAjXyTOtb7JBFZ3UJD6vKBPSYeefZyojYx3Iw Vsov9RUUAJE0+ZJJ7jINB9EYe7nCdEJ78iTG7PXfd90E98QCL7g9ThZtR0nwhqGv ONmQDBghS0TBjB98cIml4G0mKMaVtCO5LxaC+lx776H3qZYw48himu0HD01/iNrQ tieSVdBvNvPfDcL/44T19US5ra6FJLLoQELwcSzctf90QLhpo1OSOTxKKu7XRr7V HwxQy/pWDFVbgDN5EpXJLL1H+0XHXpwifhZ07MfhPuzunB7lodocH7RsbuYxhSGD TyWZbnC+yPUoRCdC5K6Rof5jW+NUbQCcgJ6Jlvee2gDsjZAnlFxxCQm7Bp2TMpBe Et+HsKbWQf2Bl3lqc7+pMpuuELvputS8aoPhrCwH7JJN3bL/VdLQbpuu5YFGhG+6 BZnUqHcnOqzKL3HEZO5LEZQO+/xVqe7HsoRVF6Eir/bzJBM6bYSGV+0Tsuea/U7d 1vtIZc6hG/p5NuH2Pj42
=0ctS
-----END PGP SIGNATURE-----