mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 15:05:16 +00:00
[(no branch, rebasing 1880-implement-the-tkey-rr)] [(no branch, rebasing 1880-implement-the-tkey-rr)] [(no branch, rebasing 1880-implement-the-tkey-rr)] [#1880] Almost finished
This commit is contained in:
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire1.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire1.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire1.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=58
|
||||||
|
003a
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=32 Key=(see hex)
|
||||||
|
0020 7878787878787878787878787878787878787878787878787878787878787878
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire2.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire2.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire2.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=66
|
||||||
|
0042
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=32 Key=(see hex)
|
||||||
|
0020 7878787878787878787878787878787878787878787878787878787878787878
|
||||||
|
# Other-Len=8 Other-Data=(see hex)
|
||||||
|
0008 6162636430313233
|
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire3.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire3.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire3.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=34
|
||||||
|
0022
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=0 Key=(see hex)
|
||||||
|
0000
|
||||||
|
# Other-Len=8 Other-Data=(see hex)
|
||||||
|
0008 6162636430313233
|
17
src/lib/dns/tests/testdata/rdata_tkey_fromWire4.wire
vendored
Normal file
17
src/lib/dns/tests/testdata/rdata_tkey_fromWire4.wire
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire4.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# DNS Name: gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=50
|
||||||
|
0032
|
||||||
|
# Algorithm=ptr=0
|
||||||
|
c000
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=32 Key=(see hex)
|
||||||
|
0020 7878787878787878787878787878787878787878787878787878787878787878
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire5.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire5.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire5.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=57
|
||||||
|
0039
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=32 Key=(see hex)
|
||||||
|
0020 7878787878787878787878787878787878787878787878787878787878787878
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire6.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire6.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire6.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=60
|
||||||
|
003c
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=32 Key=(see hex)
|
||||||
|
0020 7878787878787878787878787878787878787878787878787878787878787878
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire7.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire7.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire7.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=117
|
||||||
|
0075
|
||||||
|
# Algorithm="01234567890123456789012345678901234567890123456789012345678901234"
|
||||||
|
432230313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233342200
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=32 Key=(see hex)
|
||||||
|
0020 7878787878787878787878787878787878787878787878787878787878787878
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire8.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire8.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire8.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=38
|
||||||
|
0026
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=65535 Key=(see hex)
|
||||||
|
ffff 2264756d6d79206461746122
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire9.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_fromWire9.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_fromWire9.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=58
|
||||||
|
003a
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=32 Key=(see hex)
|
||||||
|
0020 7878787878787878787878787878787878787878787878787878787878787878
|
||||||
|
# Other-Len=65535 Other-Data=(see hex)
|
||||||
|
ffff
|
14
src/lib/dns/tests/testdata/rdata_tkey_toWire1.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_toWire1.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_toWire1.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=26
|
||||||
|
001a
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=0 Key=(see hex)
|
||||||
|
0000
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
14
src/lib/dns/tests/testdata/rdata_tkey_toWire2.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_toWire2.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_toWire2.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=38
|
||||||
|
0026
|
||||||
|
# Algorithm=GSS-TSIG
|
||||||
|
084753532d5453494700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=16
|
||||||
|
608d42c0 608d50d0 0003 0010
|
||||||
|
# Key Len=12 Key=(see hex)
|
||||||
|
000c 140284140284140284140284
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
14
src/lib/dns/tests/testdata/rdata_tkey_toWire3.wire
vendored
Normal file
14
src/lib/dns/tests/testdata/rdata_tkey_toWire3.wire
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_toWire3.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=44
|
||||||
|
002c
|
||||||
|
# Algorithm=gss.tsig
|
||||||
|
03677373047473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=16
|
||||||
|
608d42c0 608d50d0 0003 0010
|
||||||
|
# Key Len=12 Key=(see hex)
|
||||||
|
000c 140284140284140284140284
|
||||||
|
# Other-Len=6 Other-Data=(see hex)
|
||||||
|
0006 140284140284
|
17
src/lib/dns/tests/testdata/rdata_tkey_toWire4.wire
vendored
Normal file
17
src/lib/dns/tests/testdata/rdata_tkey_toWire4.wire
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_toWire4.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# DNS Name: gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=26
|
||||||
|
001a
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=0 Key=(see hex)
|
||||||
|
0000
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
17
src/lib/dns/tests/testdata/rdata_tkey_toWire5.wire
vendored
Normal file
17
src/lib/dns/tests/testdata/rdata_tkey_toWire5.wire
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
###
|
||||||
|
### This data file was auto-generated from rdata_tkey_toWire5.spec
|
||||||
|
###
|
||||||
|
|
||||||
|
# TKEY RDATA, RDLEN=26
|
||||||
|
001a
|
||||||
|
# Algorithm=gss-tsig
|
||||||
|
086773732d7473696700
|
||||||
|
# Inception=1619870400 Expire=1619874000 Mode=3 Error=0
|
||||||
|
608d42c0 608d50d0 0003 0000
|
||||||
|
# Key Len=0 Key=(see hex)
|
||||||
|
0000
|
||||||
|
# Other-Len=0 Other-Data=(see hex)
|
||||||
|
0000
|
||||||
|
|
||||||
|
# DNS Name: ptr=2
|
||||||
|
c002
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2010-2019 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2021-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// 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
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -40,6 +40,7 @@ TEST_F(TSIGKeyTest, algorithmNames) {
|
|||||||
EXPECT_EQ(Name("hmac-sha224"), TSIGKey::HMACSHA224_NAME());
|
EXPECT_EQ(Name("hmac-sha224"), TSIGKey::HMACSHA224_NAME());
|
||||||
EXPECT_EQ(Name("hmac-sha384"), TSIGKey::HMACSHA384_NAME());
|
EXPECT_EQ(Name("hmac-sha384"), TSIGKey::HMACSHA384_NAME());
|
||||||
EXPECT_EQ(Name("hmac-sha512"), TSIGKey::HMACSHA512_NAME());
|
EXPECT_EQ(Name("hmac-sha512"), TSIGKey::HMACSHA512_NAME());
|
||||||
|
EXPECT_EQ(Name("gss-tsig"), TSIGKey::GSSTSIG_NAME());
|
||||||
|
|
||||||
// Also check conversion to cryptolink definitions
|
// Also check conversion to cryptolink definitions
|
||||||
EXPECT_EQ(isc::cryptolink::MD5, TSIGKey(key_name, TSIGKey::HMACMD5_NAME(),
|
EXPECT_EQ(isc::cryptolink::MD5, TSIGKey(key_name, TSIGKey::HMACMD5_NAME(),
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2010-2021 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// 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
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -300,6 +300,12 @@ Name& TSIGKey::HMACSHA512_NAME() {
|
|||||||
return (alg_name);
|
return (alg_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const
|
||||||
|
Name& TSIGKey::GSSTSIG_NAME() {
|
||||||
|
static Name alg_name("gss-tsig");
|
||||||
|
return (alg_name);
|
||||||
|
}
|
||||||
|
|
||||||
struct TSIGKeyRing::TSIGKeyRingImpl {
|
struct TSIGKeyRing::TSIGKeyRingImpl {
|
||||||
typedef map<Name, TSIGKey> TSIGKeyMap;
|
typedef map<Name, TSIGKey> TSIGKeyMap;
|
||||||
typedef pair<Name, TSIGKey> NameAndKey;
|
typedef pair<Name, TSIGKey> NameAndKey;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2010-2021 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// 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
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -216,6 +216,7 @@ public:
|
|||||||
static const Name& HMACSHA224_NAME(); ///< HMAC-SHA256 (RFC4635)
|
static const Name& HMACSHA224_NAME(); ///< HMAC-SHA256 (RFC4635)
|
||||||
static const Name& HMACSHA384_NAME(); ///< HMAC-SHA256 (RFC4635)
|
static const Name& HMACSHA384_NAME(); ///< HMAC-SHA256 (RFC4635)
|
||||||
static const Name& HMACSHA512_NAME(); ///< HMAC-SHA256 (RFC4635)
|
static const Name& HMACSHA512_NAME(); ///< HMAC-SHA256 (RFC4635)
|
||||||
|
static const Name& GSSTSIG_NAME(); ///< GSS-TSIG (RFC3645)
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user