[Openvpn-devel] Remove ENABLE_CRYPTO_OPENSSL ifdef inside ENABLE_CRYPTO_OPENSSL ifdef

Message ID 20211207165035.3274728-1-arne@rfc2549.org
State Accepted
Headers show
Series
  • [Openvpn-devel] Remove ENABLE_CRYPTO_OPENSSL ifdef inside ENABLE_CRYPTO_OPENSSL ifdef
Related show

Commit Message

Arne Schwabe Dec. 7, 2021, 4:50 p.m.
This ifdef is redundant.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
---
 src/openvpn/ssl_openssl.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Gert Doering Dec. 7, 2021, 5:16 p.m. | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

"Now that was an easy one" :-)  (and going back and finding out why
it ended being there in the first place was an interesting journey
via 9b33b5a4b and bf707bd2b)

Your patch has been applied to the master branch.

commit 2aef01df6ca54ca6e04923aa988b22c5df9f48f8
Author: Arne Schwabe
Date:   Tue Dec 7 17:50:35 2021 +0100

     Remove ENABLE_CRYPTO_OPENSSL ifdef inside ENABLE_CRYPTO_OPENSSL ifdef

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20211207165035.3274728-1-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23326.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
index ab9a8f347..724664bb9 100644
--- a/src/openvpn/ssl_openssl.c
+++ b/src/openvpn/ssl_openssl.c
@@ -1964,13 +1964,11 @@  key_state_write_plaintext(struct key_state_ssl *ks_ssl, struct buffer *buf)
     int ret = 0;
     perf_push(PERF_BIO_WRITE_PLAINTEXT);
 
-#ifdef ENABLE_CRYPTO_OPENSSL
     ASSERT(NULL != ks_ssl);
 
     ret = bio_write(ks_ssl->ssl_bio, BPTR(buf), BLEN(buf),
                     "tls_write_plaintext");
     bio_write_post(ret, buf);
-#endif /* ENABLE_CRYPTO_OPENSSL */
 
     perf_pop();
     return ret;