* Re: dnsmasq can be built with dnssec support in new nettle versions
2019-09-07 13:21 [PR PATCH] dnsmasq can be built with dnssec support in new nettle versions voidlinux-github
@ 2019-09-07 13:35 ` voidlinux-github
2019-09-07 13:36 ` voidlinux-github
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-09-07 13:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/pull/14282#issuecomment-529108814
Comment:
Hm I don't think a revbump would be necessary as this code is disabled by default.
And maybe use the patch with the commit message etc, so its easier to follow that this patch comes from upstream and can be removed next update.
```
From: Vladislav Grishenko <themiron@mail.ru>
Date: Wed, 26 Jun 2019 15:27:11 +0000 (+0500)
Subject: Fix build with libnettle 3.5
X-Git-Url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff_plain;h=ab73a746a0d6fcac2e682c5548eeb87fb9c9c82e;hp=69bc94779c2f035a9fffdb5327a54c3aeca73ed5
Fix build with libnettle 3.5
---
diff --git a/src/crypto.c b/src/crypto.c
index ebb871e..fecc64a 100644
--- src/crypto.c
+++ src/crypto.c
@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
static struct ecc_point *key_256 = NULL, *key_384 = NULL;
static mpz_t x, y;
static struct dsa_signature *sig_struct;
+#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4
+#define nettle_get_secp_256r1() (&nettle_secp_256r1)
+#define nettle_get_secp_384r1() (&nettle_secp_384r1)
+#endif
if (!sig_struct)
{
@@ -294,7 +298,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
return 0;
- nettle_ecc_point_init(key_256, &nettle_secp_256r1);
+ nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
}
key = key_256;
@@ -307,7 +311,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
return 0;
- nettle_ecc_point_init(key_384, &nettle_secp_384r1);
+ nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
}
key = key_384;
```
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dnsmasq can be built with dnssec support in new nettle versions
2019-09-07 13:21 [PR PATCH] dnsmasq can be built with dnssec support in new nettle versions voidlinux-github
2019-09-07 13:35 ` voidlinux-github
@ 2019-09-07 13:36 ` voidlinux-github
2019-09-07 15:44 ` [PR PATCH] [Updated] " voidlinux-github
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-09-07 13:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/pull/14282#issuecomment-529108911
Comment:
And please change the commit message to something like `dnsmasq: add patch for dnssec with nettle 3.5.1`.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Updated] dnsmasq can be built with dnssec support in new nettle versions
2019-09-07 13:21 [PR PATCH] dnsmasq can be built with dnssec support in new nettle versions voidlinux-github
2019-09-07 13:35 ` voidlinux-github
2019-09-07 13:36 ` voidlinux-github
@ 2019-09-07 15:44 ` voidlinux-github
2019-09-07 15:44 ` voidlinux-github
2019-09-07 15:45 ` [PR PATCH] [Merged]: " voidlinux-github
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-09-07 15:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
There is an updated pull request by bagginslin against master on the void-packages repository
https://github.com/bagginslin/void-packages dnsmasq_nettle
https://github.com/void-linux/void-packages/pull/14282
dnsmasq can be built with dnssec support in new nettle versions
Added a patch which allows dnsmasq to be successfully compiled with new nettle versions, with different function names.
A patch file from https://github.com/void-linux/void-packages/pull/14282.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dnsmasq_nettle-14282.patch --]
[-- Type: text/x-diff, Size: 2224 bytes --]
From 20795cf456b2334199ff26ab49cf24bda9e0f716 Mon Sep 17 00:00:00 2001
From: bagginslin <bagginslin@protonmail.com>
Date: Sat, 7 Sep 2019 13:57:24 +0100
Subject: [PATCH] dnsmasq: add patch for dnssec with nettle 3.5.1
---
srcpkgs/dnsmasq/patches/nettle35.patch | 42 ++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 srcpkgs/dnsmasq/patches/nettle35.patch
diff --git a/srcpkgs/dnsmasq/patches/nettle35.patch b/srcpkgs/dnsmasq/patches/nettle35.patch
new file mode 100644
index 00000000000..90e83d2e00d
--- /dev/null
+++ b/srcpkgs/dnsmasq/patches/nettle35.patch
@@ -0,0 +1,42 @@
+From: Vladislav Grishenko <themiron@mail.ru>
+Date: Wed, 26 Jun 2019 15:27:11 +0000 (+0500)
+Subject: Fix build with libnettle 3.5
+X-Git-Url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff_plain;h=ab73a746a0d6fcac2e682c5548eeb87fb9c9c82e;hp=69bc94779c2f035a9fffdb5327a54c3aeca73ed5
+
+Fix build with libnettle 3.5
+---
+
+diff --git a/src/crypto.c b/src/crypto.c
+index ebb871e..fecc64a 100644
+--- src/crypto.c
++++ src/crypto.c
+@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ static struct ecc_point *key_256 = NULL, *key_384 = NULL;
+ static mpz_t x, y;
+ static struct dsa_signature *sig_struct;
++#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4
++#define nettle_get_secp_256r1() (&nettle_secp_256r1)
++#define nettle_get_secp_384r1() (&nettle_secp_384r1)
++#endif
+
+ if (!sig_struct)
+ {
+@@ -294,7 +298,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
+ return 0;
+
+- nettle_ecc_point_init(key_256, &nettle_secp_256r1);
++ nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
+ }
+
+ key = key_256;
+@@ -307,7 +311,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
+ return 0;
+
+- nettle_ecc_point_init(key_384, &nettle_secp_384r1);
++ nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
+ }
+
+ key = key_384;
+
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Updated] dnsmasq can be built with dnssec support in new nettle versions
2019-09-07 13:21 [PR PATCH] dnsmasq can be built with dnssec support in new nettle versions voidlinux-github
` (2 preceding siblings ...)
2019-09-07 15:44 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-09-07 15:44 ` voidlinux-github
2019-09-07 15:45 ` [PR PATCH] [Merged]: " voidlinux-github
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-09-07 15:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
There is an updated pull request by bagginslin against master on the void-packages repository
https://github.com/bagginslin/void-packages dnsmasq_nettle
https://github.com/void-linux/void-packages/pull/14282
dnsmasq can be built with dnssec support in new nettle versions
Added a patch which allows dnsmasq to be successfully compiled with new nettle versions, with different function names.
A patch file from https://github.com/void-linux/void-packages/pull/14282.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dnsmasq_nettle-14282.patch --]
[-- Type: text/x-diff, Size: 2224 bytes --]
From 20795cf456b2334199ff26ab49cf24bda9e0f716 Mon Sep 17 00:00:00 2001
From: bagginslin <bagginslin@protonmail.com>
Date: Sat, 7 Sep 2019 13:57:24 +0100
Subject: [PATCH] dnsmasq: add patch for dnssec with nettle 3.5.1
---
srcpkgs/dnsmasq/patches/nettle35.patch | 42 ++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 srcpkgs/dnsmasq/patches/nettle35.patch
diff --git a/srcpkgs/dnsmasq/patches/nettle35.patch b/srcpkgs/dnsmasq/patches/nettle35.patch
new file mode 100644
index 00000000000..90e83d2e00d
--- /dev/null
+++ b/srcpkgs/dnsmasq/patches/nettle35.patch
@@ -0,0 +1,42 @@
+From: Vladislav Grishenko <themiron@mail.ru>
+Date: Wed, 26 Jun 2019 15:27:11 +0000 (+0500)
+Subject: Fix build with libnettle 3.5
+X-Git-Url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff_plain;h=ab73a746a0d6fcac2e682c5548eeb87fb9c9c82e;hp=69bc94779c2f035a9fffdb5327a54c3aeca73ed5
+
+Fix build with libnettle 3.5
+---
+
+diff --git a/src/crypto.c b/src/crypto.c
+index ebb871e..fecc64a 100644
+--- src/crypto.c
++++ src/crypto.c
+@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ static struct ecc_point *key_256 = NULL, *key_384 = NULL;
+ static mpz_t x, y;
+ static struct dsa_signature *sig_struct;
++#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4
++#define nettle_get_secp_256r1() (&nettle_secp_256r1)
++#define nettle_get_secp_384r1() (&nettle_secp_384r1)
++#endif
+
+ if (!sig_struct)
+ {
+@@ -294,7 +298,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
+ return 0;
+
+- nettle_ecc_point_init(key_256, &nettle_secp_256r1);
++ nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
+ }
+
+ key = key_256;
+@@ -307,7 +311,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
+ return 0;
+
+- nettle_ecc_point_init(key_384, &nettle_secp_384r1);
++ nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
+ }
+
+ key = key_384;
+
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Merged]: dnsmasq can be built with dnssec support in new nettle versions
2019-09-07 13:21 [PR PATCH] dnsmasq can be built with dnssec support in new nettle versions voidlinux-github
` (3 preceding siblings ...)
2019-09-07 15:44 ` voidlinux-github
@ 2019-09-07 15:45 ` voidlinux-github
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2019-09-07 15:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
There's a merged pull request on the void-packages repository
dnsmasq can be built with dnssec support in new nettle versions
https://github.com/void-linux/void-packages/pull/14282
Description:
Added a patch which allows dnsmasq to be successfully compiled with new nettle versions, with different function names.
^ permalink raw reply [flat|nested] 6+ messages in thread