Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
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
Joey Salazar
BIND
Commits
9b9182fe
Commit
9b9182fe
authored
Jul 31, 2017
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Ed25519 support (#44696)
parent
93ae9a09
Changes
57
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
3468 additions
and
80 deletions
+3468
-80
CHANGES
CHANGES
+2
-0
bin/dnssec/dnssec-keyfromlabel.c
bin/dnssec/dnssec-keyfromlabel.c
+4
-2
bin/dnssec/dnssec-keyfromlabel.docbook
bin/dnssec/dnssec-keyfromlabel.docbook
+1
-1
bin/dnssec/dnssec-keygen.c
bin/dnssec/dnssec-keygen.c
+17
-3
bin/dnssec/dnssec-keygen.docbook
bin/dnssec/dnssec-keygen.docbook
+3
-3
bin/pkcs11/pkcs11-keygen.c
bin/pkcs11/pkcs11-keygen.c
+42
-4
bin/pkcs11/pkcs11-keygen.docbook
bin/pkcs11/pkcs11-keygen.docbook
+5
-4
bin/python/isc/dnskey.py.in
bin/python/isc/dnskey.py.in
+1
-1
bin/python/isc/policy.py.in
bin/python/isc/policy.py.in
+19
-3
bin/tests/system/conf.sh.in
bin/tests/system/conf.sh.in
+1
-1
bin/tests/system/conf.sh.win32
bin/tests/system/conf.sh.win32
+11
-4
bin/tests/system/eddsa/clean.sh
bin/tests/system/eddsa/clean.sh
+15
-0
bin/tests/system/eddsa/ns1/named.conf
bin/tests/system/eddsa/ns1/named.conf
+34
-0
bin/tests/system/eddsa/ns1/root.db.in
bin/tests/system/eddsa/ns1/root.db.in
+18
-0
bin/tests/system/eddsa/ns1/sign.sh
bin/tests/system/eddsa/ns1/sign.sh
+38
-0
bin/tests/system/eddsa/ns2/Xexample.com.+015+03613.key
bin/tests/system/eddsa/ns2/Xexample.com.+015+03613.key
+1
-0
bin/tests/system/eddsa/ns2/Xexample.com.+015+03613.private
bin/tests/system/eddsa/ns2/Xexample.com.+015+03613.private
+4
-0
bin/tests/system/eddsa/ns2/Xexample.com.+015+35217.key
bin/tests/system/eddsa/ns2/Xexample.com.+015+35217.key
+1
-0
bin/tests/system/eddsa/ns2/Xexample.com.+015+35217.private
bin/tests/system/eddsa/ns2/Xexample.com.+015+35217.private
+3
-0
bin/tests/system/eddsa/ns2/example.com.db
bin/tests/system/eddsa/ns2/example.com.db
+22
-0
bin/tests/system/eddsa/ns2/named.conf
bin/tests/system/eddsa/ns2/named.conf
+34
-0
bin/tests/system/eddsa/ns2/sign.sh
bin/tests/system/eddsa/ns2/sign.sh
+23
-0
bin/tests/system/eddsa/prereq.sh
bin/tests/system/eddsa/prereq.sh
+12
-0
bin/tests/system/eddsa/setup.sh
bin/tests/system/eddsa/setup.sh
+14
-0
bin/tests/system/eddsa/tests.sh
bin/tests/system/eddsa/tests.sh
+46
-0
bin/tests/system/pkcs11/ns1/named.conf
bin/tests/system/pkcs11/ns1/named.conf
+6
-0
bin/tests/system/pkcs11/prereq.sh
bin/tests/system/pkcs11/prereq.sh
+14
-8
bin/tests/system/pkcs11/setup.sh
bin/tests/system/pkcs11/setup.sh
+32
-4
bin/tests/system/pkcs11/tests.sh
bin/tests/system/pkcs11/tests.sh
+14
-7
bin/tests/system/testcrypto.sh
bin/tests/system/testcrypto.sh
+5
-0
config.h.in
config.h.in
+12
-0
config.h.win32
config.h.win32
+12
-0
configure
configure
+176
-1
configure.in
configure.in
+122
-1
doc/rfc/rfc8080.txt
doc/rfc/rfc8080.txt
+395
-0
lib/dns/Makefile.in
lib/dns/Makefile.in
+10
-5
lib/dns/dst_api.c
lib/dns/dst_api.c
+22
-1
lib/dns/dst_internal.h
lib/dns/dst_internal.h
+6
-0
lib/dns/dst_parse.c
lib/dns/dst_parse.c
+45
-0
lib/dns/dst_parse.h
lib/dns/dst_parse.h
+5
-0
lib/dns/include/dns/keyvalues.h
lib/dns/include/dns/keyvalues.h
+8
-0
lib/dns/include/dst/dst.h
lib/dns/include/dst/dst.h
+2
-0
lib/dns/openssleddsa_link.c
lib/dns/openssleddsa_link.c
+670
-0
lib/dns/pkcs11eddsa_link.c
lib/dns/pkcs11eddsa_link.c
+1180
-0
lib/dns/rcode.c
lib/dns/rcode.c
+2
-0
lib/dns/win32/libdns.dsp.in
lib/dns/win32/libdns.dsp.in
+8
-0
lib/dns/win32/libdns.mak.in
lib/dns/win32/libdns.mak.in
+48
-0
lib/dns/win32/libdns.vcxproj.filters.in
lib/dns/win32/libdns.vcxproj.filters.in
+6
-0
lib/dns/win32/libdns.vcxproj.in
lib/dns/win32/libdns.vcxproj.in
+2
-0
lib/isc/hmacmd5.c
lib/isc/hmacmd5.c
+12
-1
lib/isc/hmacsha.c
lib/isc/hmacsha.c
+60
-5
lib/isc/include/pk11/constants.h
lib/isc/include/pk11/constants.h
+6
-0
lib/isc/include/pk11/site.h
lib/isc/include/pk11/site.h
+9
-5
lib/isc/include/pkcs11/Makefile.in
lib/isc/include/pkcs11/Makefile.in
+1
-1
lib/isc/include/pkcs11/eddsa.h
lib/isc/include/pkcs11/eddsa.h
+22
-0
lib/isc/pk11.c
lib/isc/pk11.c
+23
-1
win32utils/Configure
win32utils/Configure
+162
-14
No files found.
CHANGES
View file @
9b9182fe
4665. [func] Add Ed25519 support (RFC 8080). [RT #25519]
4664. [func] Add a "glue-cache" option to enable or disable the
glue cache. The default is "no" to reduce memory
usage, but enabling this option will improve
...
...
bin/dnssec/dnssec-keyfromlabel.c
View file @
9b9182fe
...
...
@@ -52,7 +52,8 @@ int verbose;
static
const
char
*
algs
=
"RSA | RSAMD5 | DH | DSA | RSASHA1 |"
" NSEC3DSA | NSEC3RSASHA1 |"
" RSASHA256 | RSASHA512 | ECCGOST |"
" ECDSAP256SHA256 | ECDSAP384SHA384"
;
" ECDSAP256SHA256 | ECDSAP384SHA384 |"
" ED25519 | ED448"
;
ISC_PLATFORM_NORETURN_PRE
static
void
usage
(
void
)
ISC_PLATFORM_NORETURN_POST
;
...
...
@@ -437,7 +438,8 @@ main(int argc, char **argv) {
alg
!=
DST_ALG_NSEC3DSA
&&
alg
!=
DST_ALG_NSEC3RSASHA1
&&
alg
!=
DST_ALG_RSASHA256
&&
alg
!=
DST_ALG_RSASHA512
&&
alg
!=
DST_ALG_ECCGOST
&&
alg
!=
DST_ALG_ECDSA256
&&
alg
!=
DST_ALG_ECDSA384
)
{
alg
!=
DST_ALG_ECDSA256
&&
alg
!=
DST_ALG_ECDSA384
&&
alg
!=
DST_ALG_ED25519
&&
alg
!=
DST_ALG_ED448
)
{
fatal
(
"%s is incompatible with NSEC3; "
"do not use the -3 option"
,
algname
);
}
...
...
bin/dnssec/dnssec-keyfromlabel.docbook
View file @
9b9182fe
...
...
@@ -102,7 +102,7 @@
Selects the cryptographic algorithm. The value of
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256
or ECDSAP384SHA384
.
ECDSAP256SHA256
, ECDSAP384SHA384, ED25519 or ED448
.
These values are case insensitive.
</para>
<para>
...
...
bin/dnssec/dnssec-keygen.c
View file @
9b9182fe
...
...
@@ -82,7 +82,8 @@ usage(void) {
" | NSEC3DSA |
\n
"
);
fprintf
(
stderr
,
" RSASHA256 | RSASHA512 | ECCGOST |
\n
"
);
fprintf
(
stderr
,
" ECDSAP256SHA256 | ECDSAP384SHA384 |
\n
"
);
fprintf
(
stderr
,
" DH | HMAC-MD5 | HMAC-SHA1 | HMAC-SHA224 | "
fprintf
(
stderr
,
" ED25519 | ED448 | DH |
\n
"
);
fprintf
(
stderr
,
" HMAC-MD5 | HMAC-SHA1 | HMAC-SHA224 | "
"HMAC-SHA256 |
\n
"
);
fprintf
(
stderr
,
" HMAC-SHA384 | HMAC-SHA512
\n
"
);
fprintf
(
stderr
,
" (default: RSASHA1, or "
...
...
@@ -101,6 +102,8 @@ usage(void) {
fprintf
(
stderr
,
" ECCGOST:
\t
ignored
\n
"
);
fprintf
(
stderr
,
" ECDSAP256SHA256:
\t
ignored
\n
"
);
fprintf
(
stderr
,
" ECDSAP384SHA384:
\t
ignored
\n
"
);
fprintf
(
stderr
,
" ED25519:
\t
ignored
\n
"
);
fprintf
(
stderr
,
" ED448:
\t
ignored
\n
"
);
fprintf
(
stderr
,
" HMAC-MD5:
\t
[1..512]
\n
"
);
fprintf
(
stderr
,
" HMAC-SHA1:
\t
[1..160]
\n
"
);
fprintf
(
stderr
,
" HMAC-SHA224:
\t
[1..224]
\n
"
);
...
...
@@ -602,7 +605,8 @@ main(int argc, char **argv) {
alg
!=
DST_ALG_NSEC3DSA
&&
alg
!=
DST_ALG_NSEC3RSASHA1
&&
alg
!=
DST_ALG_RSASHA256
&&
alg
!=
DST_ALG_RSASHA512
&&
alg
!=
DST_ALG_ECCGOST
&&
alg
!=
DST_ALG_ECDSA256
&&
alg
!=
DST_ALG_ECDSA384
)
{
alg
!=
DST_ALG_ECDSA256
&&
alg
!=
DST_ALG_ECDSA384
&&
alg
!=
DST_ALG_ED25519
&&
alg
!=
DST_ALG_ED448
)
{
fatal
(
"%s is incompatible with NSEC3; "
"do not use the -3 option"
,
algname
);
}
...
...
@@ -636,7 +640,9 @@ main(int argc, char **argv) {
" to %d
\n
"
,
size
);
}
else
if
(
alg
!=
DST_ALG_ECCGOST
&&
alg
!=
DST_ALG_ECDSA256
&&
alg
!=
DST_ALG_ECDSA384
)
alg
!=
DST_ALG_ECDSA384
&&
alg
!=
DST_ALG_ED25519
&&
alg
!=
DST_ALG_ED448
)
fatal
(
"key size not specified (-b option)"
);
}
...
...
@@ -773,6 +779,12 @@ main(int argc, char **argv) {
case
DST_ALG_ECDSA384
:
size
=
384
;
break
;
case
DST_ALG_ED25519
:
size
=
256
;
break
;
case
DST_ALG_ED448
:
size
=
456
;
break
;
case
DST_ALG_HMACMD5
:
options
|=
DST_TYPE_KEY
;
if
(
size
<
1
||
size
>
512
)
...
...
@@ -906,6 +918,8 @@ main(int argc, char **argv) {
case
DST_ALG_ECCGOST
:
case
DST_ALG_ECDSA256
:
case
DST_ALG_ECDSA384
:
case
DST_ALG_ED25519
:
case
DST_ALG_ED448
:
show_progress
=
ISC_TRUE
;
/* fall through */
...
...
bin/dnssec/dnssec-keygen.docbook
View file @
9b9182fe
...
...
@@ -114,7 +114,7 @@
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256
or ECDSAP384SHA384
.
ECDSAP256SHA256
, ECDSAP384SHA384, ED25519 or ED448
.
For TSIG/TKEY, the value must
be DH (Diffie Hellman), HMAC-MD5, HMAC-SHA1, HMAC-SHA224,
HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512. These values are
...
...
@@ -186,8 +186,8 @@
If this option is used and no algorithm is explicitly
set on the command line, NSEC3RSASHA1 will be used by
default. Note that RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256
and ECDSAP384SHA384 algorithms
are NSEC3-capable.
ECDSAP256SHA256
, ECDSAP384SHA384, ED25519 and ED448
a
lgorithms a
re NSEC3-capable.
</para>
</listitem>
</varlistentry>
...
...
bin/pkcs11/pkcs11-keygen.c
View file @
9b9182fe
...
...
@@ -73,6 +73,7 @@
#define WANT_DH_PRIMES
#define WANT_ECC_CURVES
#include <pk11/constants.h>
#include <pkcs11/eddsa.h>
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
#define getpassphrase(x) getpass(x)
...
...
@@ -82,13 +83,14 @@
static
CK_BBOOL
truevalue
=
TRUE
;
static
CK_BBOOL
falsevalue
=
FALSE
;
/* Key class: RSA, ECC, DSA, DH, or unknown */
/* Key class: RSA, ECC,
ECX,
DSA, DH, or unknown */
typedef
enum
{
key_unknown
,
key_rsa
,
key_dsa
,
key_dh
,
key_ecc
key_ecc
,
key_ecx
}
key_class_t
;
/*
...
...
@@ -136,7 +138,7 @@ static CK_ATTRIBUTE rsa_template[] = {
};
/*
* Public key template for ECC keys
* Public key template for ECC
/ECX
keys
*/
#define ECC_LABEL 0
#define ECC_VERIFY 1
...
...
@@ -247,6 +249,9 @@ keyclass_fromtext(const char *name) {
else
if
(
strncasecmp
(
name
,
"ecc"
,
3
)
==
0
||
strncasecmp
(
name
,
"ecdsa"
,
5
)
==
0
)
return
(
key_ecc
);
else
if
(
strncasecmp
(
name
,
"ecx"
,
3
)
==
0
||
strncasecmp
(
name
,
"ed"
,
2
)
==
0
)
return
(
key_ecx
);
else
return
(
key_unknown
);
}
...
...
@@ -425,6 +430,39 @@ main(int argc, char *argv[]) {
sizeof
(
pk11_ecc_secp384r1
);
}
break
;
case
key_ecx
:
#ifndef CKM_EDDSA_KEY_PAIR_GEN
fprintf
(
stderr
,
"CKM_EDDSA_KEY_PAIR_GEN is not defined
\n
"
);
usage
();
#endif
op_type
=
OP_EC
;
if
(
bits
==
0
)
bits
=
256
;
else
if
(
bits
!=
256
&&
bits
!=
456
)
{
fprintf
(
stderr
,
"ECX keys only support bit sizes of "
"256 and 456
\n
"
);
exit
(
2
);
}
mech
.
mechanism
=
CKM_EDDSA_KEY_PAIR_GEN
;
mech
.
pParameter
=
NULL
;
mech
.
ulParameterLen
=
0
;
public_template
=
ecc_template
;
public_attrcnt
=
ECC_ATTRS
;
id_offset
=
ECC_ID
;
if
(
bits
==
256
)
{
public_template
[
4
].
pValue
=
pk11_ecc_ed25519
;
public_template
[
4
].
ulValueLen
=
sizeof
(
pk11_ecc_ed25519
);
}
else
{
public_template
[
4
].
pValue
=
pk11_ecc_ed448
;
public_template
[
4
].
ulValueLen
=
sizeof
(
pk11_ecc_ed448
);
}
break
;
case
key_dsa
:
op_type
=
OP_DSA
;
...
...
@@ -570,7 +608,7 @@ main(int argc, char *argv[]) {
private_template
[
5
].
pValue
=
&
truevalue
;
}
if
(
keyclass
==
key_rsa
||
keyclass
==
key_ecc
)
if
(
keyclass
==
key_rsa
||
keyclass
==
key_ecc
||
keyclass
==
key_ecx
)
goto
generate_keys
;
/*
...
...
bin/pkcs11/pkcs11-keygen.docbook
View file @
9b9182fe
...
...
@@ -71,11 +71,11 @@
<listitem>
<para>
Specify the key algorithm class: Supported classes are RSA,
DSA, DH,
and ECC
. In addition to these strings, the
DSA, DH,
ECC and ECX
. In addition to these strings, the
<option>algorithm</option> can be specified as a DNSSEC
signing algorithm that will be used with this key; for
example, NSEC3RSASHA1 maps to RSA,
and
ECDSAP256SHA256 maps
to ECC. The default class is "RSA".
example, NSEC3RSASHA1 maps to RSA, ECDSAP256SHA256 maps
to ECC
, and ED25519 to ECX
. The default class is "RSA".
</para>
</listitem>
</varlistentry>
...
...
@@ -86,7 +86,8 @@
<para>
Create the key pair with <option>keysize</option> bits of
prime. For ECC keys, the only valid values are 256 and 384,
and the default is 256.
and the default is 256. For ECX kyes, the only valid values
are 256 and 456, and the default is 256.
</para>
</listitem>
</varlistentry>
...
...
bin/python/isc/dnskey.py.in
View file @
9b9182fe
...
...
@@ -30,7 +30,7 @@ class dnskey:
_ALGNAMES = (None, 'RSAMD5', 'DH', 'DSA', 'ECC', 'RSASHA1',
'NSEC3DSA', 'NSEC3RSASHA1', 'RSASHA256', None,
'RSASHA512', None, 'ECCGOST', 'ECDSAP256SHA256',
'ECDSAP384SHA384')
'ECDSAP384SHA384'
, 'ED25519', 'ED448'
)
def __init__(self, key, directory=None, keyttl=None):
# this makes it possible to use algname as a class or instance method
...
...
bin/python/isc/policy.py.in
View file @
9b9182fe
...
...
@@ -68,7 +68,7 @@ class PolicyLex:
return t
def t_ALGNAME(self, t):
r'(?i)\b(RSAMD5|DH|DSA|NSEC3DSA|ECC|RSASHA1|NSEC3RSASHA1|RSASHA256|RSASHA512|ECCGOST|ECDSAP256SHA256|ECDSAP384SHA384)\b'
r'(?i)\b(RSAMD5|DH|DSA|NSEC3DSA|ECC|RSASHA1|NSEC3RSASHA1|RSASHA256|RSASHA512|ECCGOST|ECDSAP256SHA256|ECDSAP384SHA384
|ED25519|ED448
)\b'
t.value = t.value.upper()
return t
...
...
@@ -138,7 +138,9 @@ class Policy:
'RSASHA512': [1024, 4096],
'ECCGOST': None,
'ECDSAP256SHA256': None,
'ECDSAP384SHA384': None}
'ECDSAP384SHA384': None,
'ED25519': None,
'ED448': None}
def __init__(self, name=None, algorithm=None, parent=None):
self.name = name
...
...
@@ -275,7 +277,9 @@ class Policy:
if self.algorithm in ['ECCGOST', \
'ECDSAP256SHA256', \
'ECDSAP384SHA384']:
'ECDSAP384SHA384', \
'ED25519', \
'ED448']:
self.ksk_keysize = None
self.zsk_keysize = None
...
...
@@ -378,6 +382,18 @@ class dnssec_policy:
self.alg_policy['ECDSAP384SHA384'].ksk_keysize = None;
self.alg_policy['ECDSAP384SHA384'].zsk_keysize = None;
self.alg_policy['ED25519'] = copy(p)
self.alg_policy['ED25519'].algorithm = "ED25519"
self.alg_policy['ED25519'].name = "ED25519"
self.alg_policy['ED25519'].ksk_keysize = None;
self.alg_policy['ED25519'].zsk_keysize = None;
self.alg_policy['ED448'] = copy(p)
self.alg_policy['ED448'].algorithm = "ED448"
self.alg_policy['ED448'].name = "ED448"
self.alg_policy['ED448'].ksk_keysize = None;
self.alg_policy['ED448'].zsk_keysize = None;
if filename:
self.load(filename)
...
...
bin/tests/system/conf.sh.in
View file @
9b9182fe
...
...
@@ -76,7 +76,7 @@ SUBDIRS="acl additional addzone allow_query autosign builtin
cacheclean case catz chain
checkconf @CHECKDS@ checknames checkzone cookie @COVERAGE@
database digdelv dlv dlvauto dlz dlzexternal
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb ecdsa
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb ecdsa
eddsa
emptyzones fetchlimit filter-aaaa formerr geoip glue gost
inline integrity ixfr keepalive @KEYMGR@ legacy limits
logfileconfig lwresd masterfile masterformat metadata mkeys
...
...
bin/tests/system/conf.sh.win32
View file @
9b9182fe
...
...
@@ -61,6 +61,7 @@ MDIG=$TOP/Build/$VSCONF/mdig@EXEEXT@
NZD2NZF
=
$TOP
/Build/
$VSCONF
/named-nzd2nzf@EXEEXT@
FSTRM_CAPTURE
=
@FSTRM_CAPTURE@
FEATURETEST
=
$TOP
/Build/
$VSCONF
/feature-test@EXEEXT@
# to port WIRETEST=$TOP/Build/$VSCONF/wire_test@EXEEXT@
# this is given as argument to native WIN32 executables
RANDFILE
=
`
cygpath
-w
$TOP
/bin/tests/system/random.data
`
...
...
@@ -72,14 +73,17 @@ KEYDELETE=$TOP/Build/$VSCONF/keydelete@EXEEXT@
LWTEST
=
$TOP
/Build/
$VSCONF
/lwtest@EXEEXT@
MAKEJOURNAL
=
$TOP
/Build/
$VSCONF
/makejournal@EXEEXT@
PIPEQUERIES
=
$TOP
/Build/
$VSCONF
/pipequeries@EXEEXT@
# to port SAMPLEUPDATE=$TOP/lib/samples/sample-update
# The "stress" test is not run by default since it creates enough
# load on the machine to make it unusable to other users.
# v6synth
SUBDIRS
=
"acl additional addzone allow_query autosign builtin cacheclean case
catz checkconf @CHECKDS@ checknames checkzone cookie @COVERAGE@
database digdelv dlv dlvauto dlz dlzexternal dname dns64 dnssec
@DNSTAP@ dscp dsdigest dyndb ecdsa ednscompliance emptyzones
SUBDIRS
=
"acl additional addzone allow_query autosign builtin
cacheclean case catz
checkconf @CHECKDS@ checknames checkzone cookie @COVERAGE@
database digdelv dlv dlvauto dlz dlzexternal dname
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb ecdsa eddsa
ednscompliance emptyzones
fetchlimit filter-aaaa formerr forward geoip glue gost inline ixfr
keepalive @KEYMGR@ legacy limits logfileconfig lwresd masterfile
masterformat metadata mkeys names notify nslookup nsupdate
...
...
@@ -90,6 +94,9 @@ SUBDIRS="acl additional addzone allow_query autosign builtin cacheclean case
tsiggss unknown upforwd verify views wildcard xfer xferquota
zero zonechecks"
# missing: chain integrity
# extra: dname ednscompliance forward
#Things that are different on Windows
KILL
=
"/bin/kill -f"
DIFF
=
"diff --strip-trailing-cr"
...
...
bin/tests/system/eddsa/clean.sh
0 → 100644
View file @
9b9182fe
#!/bin/sh
#
# Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
rm
-f
*
/K
*
*
/dsset-
*
*
/
*
.signed
*
/trusted.conf
rm
-f
ns1/root.db
rm
-f
ns
*
/signer.err
rm
-f
dig.out
*
rm
-f
*
/named.run
rm
-f
*
/named.memstats
rm
-f
ns
*
/named.lock
bin/tests/system/eddsa/ns1/named.conf
0 → 100644
View file @
9b9182fe
/*
*
Copyright
(
C
)
2017
Internet
Systems
Consortium
,
Inc
. (
"ISC"
)
*
*
This
Source
Code
Form
is
subject
to
the
terms
of
the
Mozilla
Public
*
License
,
v
.
2
.
0
.
If
a
copy
of
the
MPL
was
not
distributed
with
this
*
file
,
You
can
obtain
one
at
http
://
mozilla
.
org
/
MPL
/
2
.
0
/.
*/
/* $
Id
$ */
//
NS1
controls
{ /*
empty
*/ };
options
{
query
-
source
address
10
.
53
.
0
.
1
;
notify
-
source
10
.
53
.
0
.
1
;
transfer
-
source
10
.
53
.
0
.
1
;
port
5300
;
pid
-
file
"named.pid"
;
listen
-
on
{
10
.
53
.
0
.
1
; };
listen
-
on
-
v6
{
none
; };
recursion
no
;
notify
yes
;
dnssec
-
enable
yes
;
dnssec
-
validation
yes
;
};
zone
"."
{
type
master
;
file
"root.db.signed"
;
};
include
"trusted.conf"
;
bin/tests/system/eddsa/ns1/root.db.in
0 → 100644
View file @
9b9182fe
; Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
; $Id$
$TTL 300
. IN SOA fdupont.isc.org. a.root.servers.nil. (
2012040600 ; serial
600 ; refresh
600 ; retry
1200 ; expire
600 ; minimum
)
. NS a.root-servers.nil.
a.root-servers.nil. A 10.53.0.1
bin/tests/system/eddsa/ns1/sign.sh
0 → 100644
View file @
9b9182fe
#!/bin/sh -e
#
# Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SYSTEMTESTTOP
=
../..
.
$SYSTEMTESTTOP
/conf.sh
zone
=
.
infile
=
root.db.in
zonefile
=
root.db
key1
=
`
$KEYGEN
-q
-r
$RANDFILE
-a
ED25519
-n
zone
$zone
`
key2
=
`
$KEYGEN
-q
-r
$RANDFILE
-a
ED25519
-n
zone
-f
KSK
$zone
`
#key2=`$KEYGEN -q -r $RANDFILE -a ED448 -n zone -f KSK $zone`
$DSFROMKEY
-a
sha-256
$key2
.key
>
dsset-256
cat
$infile
$key1
.key
$key2
.key
>
$zonefile
$SIGNER
-P
-g
-r
$RANDFILE
-o
$zone
$zonefile
>
/dev/null 2> signer.err
||
cat
signer.err
# Configure the resolving server with a trusted key.
cat
$key1
.key |
grep
-v
'^; '
|
$PERL
-n
-e
'
local ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
local $key = join("", @rest);
print <<EOF
trusted-keys {
"$dn" $flags $proto $alg "$key";
};
EOF
'
>
trusted.conf
cp
trusted.conf ../ns2/trusted.conf
cd
../ns2
&&
$SHELL
sign.sh
bin/tests/system/eddsa/ns2/Xexample.com.+015+03613.key
0 → 100644
View file @
9b9182fe
example.com. IN DNSKEY 257 3 15 l02Woi0iS8Aa25FQkUd9RMzZHJpBoRQwAQEX1SxZJA4=
bin/tests/system/eddsa/ns2/Xexample.com.+015+03613.private
0 → 100644
View file @
9b9182fe
Private-key-format: v1.2
Algorithm: 15 (ED25519)
PrivateKey: ODIyNjAzODQ2MjgwODAxMjI2NDUxOTAyMDQxNDIyNjI=
bin/tests/system/eddsa/ns2/Xexample.com.+015+35217.key
0 → 100644
View file @
9b9182fe
example.com. IN DNSKEY 257 3 15 zPnZ/QwEe7S8C5SPz2OfS5RR40ATk2/rYnE9xHIEijs=
bin/tests/system/eddsa/ns2/Xexample.com.+015+35217.private
0 → 100644
View file @
9b9182fe
Private-key-format: v1.2
Algorithm: 15 (ED25519)
PrivateKey: DSSF3o0s0f+ElWzj9E/Osxw8hLpk55chkmx0LYN5WiY=
bin/tests/system/eddsa/ns2/example.com.db
0 → 100644
View file @
9b9182fe
; Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
; $Id$
$TTL 3600
@ IN SOA fdupont.isc.org. ns.example.com. (
2012040600 ; serial
600 ; refresh
600 ; retry
1200 ; expire
3600 ; minimum
)
MX 10 mail.example.com.
NS ns.example.com.
ns.example.com. A 10.53.0.3
;
$INCLUDE Kexample.com.+015+03613.key
$INCLUDE Kexample.com.+015+35217.key
bin/tests/system/eddsa/ns2/named.conf
0 → 100644
View file @
9b9182fe
/*
*
Copyright
(
C
)
2017
Internet
Systems
Consortium
,
Inc
. (
"ISC"
)
*
*
This
Source
Code
Form
is
subject
to
the
terms
of
the
Mozilla
Public
*
License
,
v
.
2
.
0
.
If
a
copy
of
the
MPL
was
not
distributed
with
this
*
file
,
You
can
obtain
one
at
http
://
mozilla
.
org
/
MPL
/
2
.
0
/.
*/
/* $
Id
$ */
//
NS2
controls
{ /*
empty
*/ };
options
{
query
-
source
address
10
.
53
.
0
.
2
;
notify
-
source
10
.
53
.
0
.
2
;
transfer
-
source
10
.
53
.
0
.
2
;
port
5300
;
pid
-
file
"named.pid"
;
listen
-
on
{
10
.
53
.
0
.
2
; };
listen
-
on
-
v6
{
none
; };
recursion
yes
;
notify
yes
;
dnssec
-
enable
yes
;
dnssec
-
validation
yes
;
};
zone
"."
{
type
hint
;
file
"../../common/root.hint"
;
};
include
"trusted.conf"
;
bin/tests/system/eddsa/ns2/sign.sh
0 → 100644
View file @
9b9182fe
#!/bin/sh -e
#
# Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SYSTEMTESTTOP
=
../..
.
$SYSTEMTESTTOP
/conf.sh
zone
=
example.com.
zonefile
=
example.com.db
starttime
=
20150729220000
endtime
=
20150819220000
for
i
in
Xexample.com.+015+03613.key Xexample.com.+015+03613.private
\
Xexample.com.+015+35217.key Xexample.com.+015+35217.private
do
cp
$i
`
echo
$i
|
sed
s/X/K/
`
done
$SIGNER
-P
-z
-s
$starttime
-e
$endtime
-r
$RANDFILE
-o
$zone
$zonefile
>
/dev/null 2> signer.err
||
cat
signer.err
bin/tests/system/eddsa/prereq.sh
0 → 100644
View file @
9b9182fe
#!/bin/sh -e
#
# Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SYSTEMTESTTOP
=
..
.
$SYSTEMTESTTOP
/conf.sh
exec
$SHELL
../testcrypto.sh eddsa
bin/tests/system/eddsa/setup.sh
0 → 100644
View file @
9b9182fe
#!/bin/sh -e
#
# Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SYSTEMTESTTOP
=
..
.
$SYSTEMTESTTOP
/conf.sh
test
-r
$RANDFILE
||
$GENRANDOM
800
$RANDFILE
cd
ns1
&&
$SHELL
sign.sh
bin/tests/system/eddsa/tests.sh
0 → 100644
View file @
9b9182fe
#!/bin/sh
#
# Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# $Id$
SYSTEMTESTTOP
=
..
.
$SYSTEMTESTTOP
/conf.sh
status
=
0
n
=
0
rm
-f
dig.out.
*
DIGOPTS
=
"+tcp +noau +noadd +nosea +nostat +nocmd +dnssec -p 5300"
# Check the example. domain
echo
"I:checking that positive validation works (
$n
)"
ret
=
0
$DIG
$DIGOPTS
.
@10.53.0.1 soa
>
dig.out.ns1.test
$n
||
ret
=
1
$DIG
$DIGOPTS
.
@10.53.0.2 soa
>
dig.out.ns2.test
$n
||
ret
=
1
$PERL
../digcomp.pl dig.out.ns1.test
$n
dig.out.ns2.test
$n
||
ret
=
1
grep
"flags:.*ad.*QUERY"
dig.out.ns2.test
$n
>
/dev/null
||
ret
=
1
n
=
`
expr
$n
+ 1
`
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
# Check test vectors (RFC 8080 + errata)
echo
"I:checking that test vectors match (
$n
)"
ret
=
0
grep
'oL9krJun7xfBOIWcGHi7mag5/hdZrKWw15jP'
ns2/example.com.db.signed
>
/dev/null
||
ret
=
1
grep
'VrbpMngwcrqNAg=='
ns2/example.com.db.signed
>
/dev/null
||
ret
=
1
grep
'zXQ0bkYgQTEFyfLyi9QoiY6D8ZdYo4wyUhVi'
ns2/example.com.db.signed
>
/dev/null
||
ret
=
1
grep
'R0O7KuI5k2pcBg=='
ns2/example.com.db.signed
>
/dev/null
||
ret
=
1
n
=
`
expr
$n
+ 1
`
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
[
$status
-eq
0
]
||
exit
1
bin/tests/system/pkcs11/ns1/named.conf
View file @
9b9182fe
...
...
@@ -42,3 +42,9 @@ zone "ecc.example." {
file
"ecc.example.db.signed"
;
allow
-
update
{
any
; };
};
zone
"ecx.example."
{
type
master
;
file
"ecx.example.db.signed"
;