[Openvpn-devel,(2.4)] Fix --disable-crypto build

Message ID 20181005135849.28718-1-steffan@karger.me
State Accepted
Headers show
Series
  • [Openvpn-devel,(2.4)] Fix --disable-crypto build
Related show

Commit Message

Steffan Karger Oct. 5, 2018, 1:58 p.m.
Commit d2ff5164 was fine for the master branch, but broke the 2.4 build if
the --disable-crypto configure options was used (which is removed in the
master branch).

Signed-off-by: Steffan Karger <steffan@karger.me>
---
 src/openvpn/init.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Gert Doering Oct. 5, 2018, 2:39 p.m. | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

Thanks.  Makes sense, and passes the test (Linux with --disable-crypto)

Your patch has been applied to the release/2.4 branch.

commit ee80ce3d6f2ebc59068338757311e0488ae620fc
Author: Steffan Karger
Date:   Fri Oct 5 15:58:49 2018 +0200

     Fix --disable-crypto build

     Signed-off-by: Steffan Karger <steffan@karger.me>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20181005135849.28718-1-steffan@karger.me>
     URL: https://www.mail-archive.com/search?l=mid&q=20181005135849.28718-1-steffan@karger.me
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering
Илья Шипицин Oct. 5, 2018, 3:23 p.m. | #2
shall we add "--disable-crypto" to travis-ci matrix in 2.4 branch ?

пт, 5 окт. 2018 г. в 19:00, Steffan Karger <steffan@karger.me>:

> Commit d2ff5164 was fine for the master branch, but broke the 2.4 build if
> the --disable-crypto configure options was used (which is removed in the
> master branch).
>
> Signed-off-by: Steffan Karger <steffan@karger.me>
> ---
>  src/openvpn/init.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/openvpn/init.c b/src/openvpn/init.c
> index 0950f07e..2d201c44 100644
> --- a/src/openvpn/init.c
> +++ b/src/openvpn/init.c
> @@ -621,9 +621,11 @@ uninit_proxy(struct context *c)
>  static void
>  do_set_ncp_options(struct context *c)
>  {
> +#ifdef ENABLE_CRYPTO
>      c->c1.ciphername = c->options.ciphername;
>      c->c1.authname = c->options.authname;
>      c->c1.keysize = c->options.keysize;
> +#endif ENABLE_CRYPTO
>  }
>
>  /*
> @@ -635,9 +637,11 @@ do_set_ncp_options(struct context *c)
>  static void
>  do_unset_ncp_options(struct context *c)
>  {
> +#ifdef ENABLE_CRYPTO
>      c->options.ciphername = c->c1.ciphername;
>      c->options.authname = c->c1.authname;
>      c->options.keysize = c->c1.keysize;
> +#endif ENABLE_CRYPTO
>  }
>
>  void
> --
> 2.17.1
>
>
>
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel
>
<div dir="ltr">shall we add &quot;--disable-crypto&quot; to travis-ci matrix in 2.4 branch ?<br></div><br><div class="gmail_quote"><div dir="ltr">пт, 5 окт. 2018 г. в 19:00, Steffan Karger &lt;<a href="mailto:steffan@karger.me">steffan@karger.me</a>&gt;:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Commit d2ff5164 was fine for the master branch, but broke the 2.4 build if<br>
the --disable-crypto configure options was used (which is removed in the<br>
master branch).<br>
<br>
Signed-off-by: Steffan Karger &lt;<a href="mailto:steffan@karger.me" target="_blank">steffan@karger.me</a>&gt;<br>
---<br>
 src/openvpn/init.c | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/openvpn/init.c b/src/openvpn/init.c<br>
index 0950f07e..2d201c44 100644<br>
--- a/src/openvpn/init.c<br>
+++ b/src/openvpn/init.c<br>
@@ -621,9 +621,11 @@ uninit_proxy(struct context *c)<br>
 static void<br>
 do_set_ncp_options(struct context *c)<br>
 {<br>
+#ifdef ENABLE_CRYPTO<br>
     c-&gt;c1.ciphername = c-&gt;options.ciphername;<br>
     c-&gt;c1.authname = c-&gt;options.authname;<br>
     c-&gt;c1.keysize = c-&gt;options.keysize;<br>
+#endif ENABLE_CRYPTO<br>
 }<br>
<br>
 /*<br>
@@ -635,9 +637,11 @@ do_set_ncp_options(struct context *c)<br>
 static void<br>
 do_unset_ncp_options(struct context *c)<br>
 {<br>
+#ifdef ENABLE_CRYPTO<br>
     c-&gt;options.ciphername = c-&gt;c1.ciphername;<br>
     c-&gt;options.authname = c-&gt;c1.authname;<br>
     c-&gt;options.keysize = c-&gt;c1.keysize;<br>
+#endif ENABLE_CRYPTO<br>
 }<br>
<br>
 void<br>
-- <br>
2.17.1<br>
<br>
<br>
<br>
_______________________________________________<br>
Openvpn-devel mailing list<br>
<a href="mailto:Openvpn-devel@lists.sourceforge.net" target="_blank">Openvpn-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/openvpn-devel" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/openvpn-devel</a><br>
</blockquote></div>
Gert Doering Oct. 5, 2018, 7:59 p.m. | #3
Hi,

On Fri, Oct 05, 2018 at 08:23:28PM +0500, ???????? ?????????????? wrote:
> shall we add "--disable-crypto" to travis-ci matrix in 2.4 branch ?

I'm afraid this will bite us a few more times, so "yes, please"

gert
Steffan Karger Oct. 6, 2018, 7:54 a.m. | #4
Hi,

On 05-10-18 21:59, Gert Doering wrote:
> On Fri, Oct 05, 2018 at 08:23:28PM +0500, ???????? ?????????????? wrote:
>> shall we add "--disable-crypto" to travis-ci matrix in 2.4 branch ?
> 
> I'm afraid this will bite us a few more times, so "yes, please"

We already have this - that's how I noticed it was broken :)

-Steffan
Gert Doering Oct. 6, 2018, 8:06 a.m. | #5
Hi,

On Sat, Oct 06, 2018 at 09:54:22AM +0200, Steffan Karger wrote:
> On 05-10-18 21:59, Gert Doering wrote:
> > On Fri, Oct 05, 2018 at 08:23:28PM +0500, ???????? ?????????????? wrote:
> >> shall we add "--disable-crypto" to travis-ci matrix in 2.4 branch ?
> > 
> > I'm afraid this will bite us a few more times, so "yes, please"
> 
> We already have this - that's how I noticed it was broken :)

OK, I was confused about this.  We *have* a --disable-crypto build 
for "Linux", and I assumed this was about "do we want for Windows",
which Steffan and Arne tell me "no, we do not, because nobody wants
to disable crypto on Windows builds".

So, "no" :-)

gert

Patch

diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 0950f07e..2d201c44 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -621,9 +621,11 @@  uninit_proxy(struct context *c)
 static void
 do_set_ncp_options(struct context *c)
 {
+#ifdef ENABLE_CRYPTO
     c->c1.ciphername = c->options.ciphername;
     c->c1.authname = c->options.authname;
     c->c1.keysize = c->options.keysize;
+#endif ENABLE_CRYPTO
 }
 
 /*
@@ -635,9 +637,11 @@  do_set_ncp_options(struct context *c)
 static void
 do_unset_ncp_options(struct context *c)
 {
+#ifdef ENABLE_CRYPTO
     c->options.ciphername = c->c1.ciphername;
     c->options.authname = c->c1.authname;
     c->options.keysize = c->c1.keysize;
+#endif ENABLE_CRYPTO
 }
 
 void