Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
c152dc84
Commit
c152dc84
authored
Feb 19, 2014
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Omit ECC from DNSSEC if nettle library is old.
parent
7bcca006
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
debian/rules
debian/rules
+4
-0
src/dnssec.c
src/dnssec.c
+13
-6
No files found.
debian/rules
View file @
c152dc84
...
...
@@ -19,6 +19,10 @@ LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
DEB_COPTS = $(COPTS)
# The nettle library in Debian is too old to include
# ECC support.
DEB_COPTS += -DNO_NETTLE_ECC
TARGET = install-i18n
DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
...
...
src/dnssec.c
View file @
c152dc84
...
...
@@ -21,8 +21,10 @@
#include <nettle/rsa.h>
#include <nettle/dsa.h>
#include <nettle/ecdsa.h>
#include <nettle/ecc-curve.h>
#ifndef NO_NETTLE_ECC
# include <nettle/ecdsa.h>
# include <nettle/ecc-curve.h>
#endif
#include <nettle/nettle-meta.h>
#include <gmp.h>
...
...
@@ -210,7 +212,9 @@ static int dsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned
return
nettle_dsa_sha1_verify_digest
(
key
,
digest
,
sig_struct
);
}
static
int
dnsmasq_ecdsa_verify
(
struct
blockdata
*
key_data
,
unsigned
int
key_len
,
unsigned
char
*
sig
,
size_t
sig_len
,
#ifndef NO_NETTLE_ECC
static
int
dnsmasq_ecdsa_verify
(
struct
blockdata
*
key_data
,
unsigned
int
key_len
,
unsigned
char
*
sig
,
size_t
sig_len
,
unsigned
char
*
digest
,
size_t
digest_len
,
int
algo
)
{
unsigned
char
*
p
;
...
...
@@ -278,7 +282,8 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
return
nettle_ecdsa_verify
(
key
,
digest_len
,
digest
,
sig_struct
);
}
#endif
static
int
verify
(
struct
blockdata
*
key_data
,
unsigned
int
key_len
,
unsigned
char
*
sig
,
size_t
sig_len
,
unsigned
char
*
digest
,
size_t
digest_len
,
int
algo
)
{
...
...
@@ -289,10 +294,12 @@ static int verify(struct blockdata *key_data, unsigned int key_len, unsigned cha
case
3
:
case
6
:
return
dsa_verify
(
key_data
,
key_len
,
sig
,
sig_len
,
digest
,
algo
);
#ifndef NO_NETTLE_ECC
case
13
:
case
14
:
return
dnsmasq_ecdsa_verify
(
key_data
,
key_len
,
sig
,
sig_len
,
digest
,
digest_len
,
algo
);
}
#endif
}
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment