mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-04 00:25:29 +00:00
migrate t_dst signature test to lib/dns/tests/dst_test
This commit is contained in:
1
bin/tests/.gitignore
vendored
1
bin/tests/.gitignore
vendored
@@ -5,7 +5,6 @@ nxtify
|
||||
sdig
|
||||
*_test
|
||||
gsstest
|
||||
t_dst
|
||||
conf.sh
|
||||
dlopen
|
||||
keycreate
|
||||
|
@@ -32,7 +32,7 @@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
LIBS = @LIBS@
|
||||
|
||||
SUBDIR = dst system @PKCS11_TOOLS@ optional
|
||||
SUBDIR = system @PKCS11_TOOLS@ optional
|
||||
|
||||
TESTDIRS = system
|
||||
|
||||
|
16
bin/tests/dst/.gitignore
vendored
16
bin/tests/dst/.gitignore
vendored
@@ -1,16 +0,0 @@
|
||||
randomfile
|
||||
Kdh.+002+18602.key
|
||||
Kdh.+002+18602.private
|
||||
Kdh.+002+48957.key
|
||||
Kdh.+002+48957.private
|
||||
Ktest.+001+00002.key
|
||||
Ktest.+001+54622.key
|
||||
Ktest.+001+54622.private
|
||||
Ktest.+003+23616.key
|
||||
Ktest.+003+23616.private
|
||||
Ktest.+003+49667.key
|
||||
dst_2_data
|
||||
t2_data_1
|
||||
t2_data_2
|
||||
t2_dsasig
|
||||
t2_rsasig
|
@@ -1 +0,0 @@
|
||||
dh. IN KEY 0 2 2 AAEBAAAAYIHI/wjtOagNga9GILSoS02IVelgLilPE/TfhtvShsiDAXqb IfxQcj2JkuOnNLs5ttb2WZXWl5/jsSjIxHMwMF2XY4gwt/lwHBf/vgYH r7aIxnKXov1jk9rymTLHGKIOtg==
|
@@ -1,6 +0,0 @@
|
||||
Private-key-format: v1.2
|
||||
Algorithm: 2 (DH)
|
||||
Prime(p): ///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxObIlFKCHmONATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjo2IP//////////
|
||||
Generator(g): Ag==
|
||||
Private_value(x): bpdsGQ1jbV3f2CGN/0Pk5KM1MlkFmMryPO1J1zoGn585fRmc9Ygw6l/HKmi2ViiDNorvd9/eV9uyYO6lYZC82R3D7rST1mAqCwbg/8gNE5dXBRbRIIq3qIl6GUYYs8mK
|
||||
Public_value(y): gcj/CO05qA2Br0YgtKhLTYhV6WAuKU8T9N+G29KGyIMBepsh/FByPYmS46c0uzm21vZZldaXn+OxKMjEczAwXZdjiDC3+XAcF/++BgevtojGcpei/WOT2vKZMscYog62
|
@@ -1 +0,0 @@
|
||||
dh. IN KEY 0 2 2 AAEBAAAAYOuaKjyMXYame2F6/ZFdEmXv0a2edB+69PEZgrExA6SJlivn 4KqAsfBHr/+0BCb+7nfWeMDSh2BXnSzWkXF1wMaCHMuz9EleG1gKFKeV Q9gKli88Cb8/jbovWChrGBNp2w==
|
@@ -1,6 +0,0 @@
|
||||
Private-key-format: v1.2
|
||||
Algorithm: 2 (DH)
|
||||
Prime(p): ///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxObIlFKCHmONATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjo2IP//////////
|
||||
Generator(g): Ag==
|
||||
Private_value(x): WJG0moh+QoZV+DYhqW7Z6O6TYpYGtSlN0Ym6JV6VRnzeH69OqMUFivqZorj3a3ofR/4zogNVyy5KLLj2NFTaLGP4Hcvt7uETJik6HrjLMhGf40QPXYgVK57Im0rv88Ca
|
||||
Public_value(y): 65oqPIxdhqZ7YXr9kV0SZe/RrZ50H7r08RmCsTEDpImWK+fgqoCx8Eev/7QEJv7ud9Z4wNKHYFedLNaRcXXAxoIcy7P0SV4bWAoUp5VD2AqWLzwJvz+Nui9YKGsYE2nb
|
@@ -1,69 +0,0 @@
|
||||
# Copyright (C) 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/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${TEST_INCLUDES} ${DNS_INCLUDES} \
|
||||
${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = @CRYPTO@
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
|
||||
DNSDEPLIBS = ../../../lib/dns/libdns.@A@
|
||||
ISCDEPLIBS = ../../../lib/isc/libisc.@A@
|
||||
|
||||
DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
|
||||
|
||||
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
|
||||
|
||||
TLIB = ../../../lib/tests/libt_api.@A@
|
||||
|
||||
TARGETS = t_dst@EXEEXT@
|
||||
|
||||
SRCS = t_dst.c
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
t_dst@EXEEXT@: t_dst.@O@ ${DEPLIBS} ${TLIB}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
|
||||
t_dst.@O@ ${TLIB} ${LIBS}
|
||||
|
||||
test: t_dst@EXEEXT@ randomfile
|
||||
../../tools/genrandom@EXEEXT@ 100 randomfile
|
||||
-@ ./t_dst@EXEEXT@ -q 1800 -a
|
||||
|
||||
randomfile:
|
||||
../../tools/genrandom@EXEEXT@ 100 randomfile
|
||||
|
||||
clean distclean::
|
||||
rm -f ${TARGETS} randomfile
|
||||
|
||||
distclean::
|
||||
rm -f Kdh.+002+18602.key
|
||||
rm -f Kdh.+002+18602.private
|
||||
rm -f Kdh.+002+48957.key
|
||||
rm -f Kdh.+002+48957.private
|
||||
rm -f Ktest.+001+00002.key
|
||||
rm -f Ktest.+001+54622.key
|
||||
rm -f Ktest.+001+54622.private
|
||||
rm -f Ktest.+003+23616.key
|
||||
rm -f Ktest.+003+23616.private
|
||||
rm -f Ktest.+003+49667.key
|
||||
rm -f dst_2_data
|
||||
rm -f t2_data_1
|
||||
rm -f t2_data_2
|
||||
rm -f t2_dsasig
|
||||
rm -f t2_rsasig
|
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# data for signature verification test
|
||||
#
|
||||
# format:
|
||||
# datafile, sigpath, keyname, keyid, alg, exp_result
|
||||
#
|
||||
t2_data_1 t2_dsasig test. 23616 DST_ALG_DSA ISC_R_SUCCESS
|
||||
t2_data_1 t2_rsasig test. 54622 DST_ALG_RSAMD5 ISC_R_SUCCESS
|
||||
# wrong sig
|
||||
t2_data_1 t2_dsasig test. 54622 DST_ALG_RSAMD5 !ISC_R_SUCCESS
|
||||
# wrong key
|
||||
#t2_data_1 t2_dsasig test. 54622 DST_ALG_DSA !ISC_R_SUCCESS
|
||||
# wrong alg
|
||||
#t2_data_1 t2_dsasig test. 23616 DST_ALG_RSAMD5 !ISC_R_SUCCESS
|
||||
# wrong data
|
||||
t2_data_2 t2_dsasig test. 23616 DST_ALG_DSA !ISC_R_SUCCESS
|
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\t_dst.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,148 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>@PLATFORM@</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>@PLATFORM@</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{EE9B94CF-7C33-4F3B-A674-FB756D422C54}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>t_dst</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\..\;@LIBXML2_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;..\..\..\..\lib\tests\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);..\..\..\..\lib\tests\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@LIBXML2_LIB@libisc.lib;libdns.lib;libtests.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..
|
||||
copy "Kdh.+002+18602.key.in" "Kdh.+002+18602.key"
|
||||
copy "Kdh.+002+18602.private.in" "Kdh.+002+18602.private"
|
||||
copy "Kdh.+002+48957.key.in" "Kdh.+002+48957.key"
|
||||
copy "Kdh.+002+48957.private.in" "Kdh.+002+48957.private"
|
||||
copy "Ktest.+001+00002.key.in" "Ktest.+001+00002.key"
|
||||
copy "Ktest.+001+54622.key.in" "Ktest.+001+54622.key"
|
||||
copy "Ktest.+001+54622.private.in" "Ktest.+001+54622.private"
|
||||
copy "Ktest.+003+23616.key.in" "Ktest.+003+23616.key"
|
||||
copy "Ktest.+003+23616.private.in" "Ktest.+003+23616.private"
|
||||
copy "Ktest.+003+49667.key.in" "Ktest.+003+49667.key"
|
||||
copy dst_2_data.in dst_2_data
|
||||
copy t2_data_1.in t2_data_1
|
||||
copy t2_data_2.in t2_data_2
|
||||
copy t2_dsasig.in t2_dsasig
|
||||
copy t2_rsasig.in t2_rsasig
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\..\;@LIBXML2_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;..\..\..\..\lib\tests\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<OutputFile>..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);..\..\..\..\lib\tests\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@LIBXML2_LIB@libisc.lib;libdns.lib;libtests.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..
|
||||
copy "Kdh.+002+18602.key.in" "Kdh.+002+18602.key"
|
||||
copy "Kdh.+002+18602.private.in" "Kdh.+002+18602.private"
|
||||
copy "Kdh.+002+48957.key.in" "Kdh.+002+48957.key"
|
||||
copy "Kdh.+002+48957.private.in" "Kdh.+002+48957.private"
|
||||
copy "Ktest.+001+00002.key.in" "Ktest.+001+00002.key"
|
||||
copy "Ktest.+001+54622.key.in" "Ktest.+001+54622.key"
|
||||
copy "Ktest.+001+54622.private.in" "Ktest.+001+54622.private"
|
||||
copy "Ktest.+003+23616.key.in" "Ktest.+003+23616.key"
|
||||
copy "Ktest.+003+23616.private.in" "Ktest.+003+23616.private"
|
||||
copy "Ktest.+003+49667.key.in" "Ktest.+003+49667.key"
|
||||
copy dst_2_data.in dst_2_data
|
||||
copy t2_data_1.in t2_data_1
|
||||
copy t2_data_2.in t2_data_2
|
||||
copy t2_dsasig.in t2_dsasig
|
||||
copy t2_rsasig.in t2_rsasig
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\t_dst.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
18
configure
vendored
18
configure
vendored
@@ -24157,7 +24157,7 @@ ac_config_commands="$ac_config_commands chmod"
|
||||
# elsewhere if there's a good reason for doing so.
|
||||
#
|
||||
|
||||
ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/dst/Makefile bin/tests/dst/Kdh.+002+18602.key bin/tests/dst/Kdh.+002+18602.private bin/tests/dst/Kdh.+002+48957.key bin/tests/dst/Kdh.+002+48957.private bin/tests/dst/Ktest.+001+00002.key bin/tests/dst/Ktest.+001+54622.key bin/tests/dst/Ktest.+001+54622.private bin/tests/dst/Ktest.+003+23616.key bin/tests/dst/Ktest.+003+23616.private bin/tests/dst/Ktest.+003+49667.key bin/tests/dst/dst_2_data bin/tests/dst/t2_data_1 bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/inline/checkdsa.sh bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/Makefile unit/unittest.sh"
|
||||
ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/inline/checkdsa.sh bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/Makefile unit/unittest.sh"
|
||||
|
||||
|
||||
#
|
||||
@@ -25196,22 +25196,6 @@ do
|
||||
"bin/python/isc/tests/policy_test.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/tests/policy_test.py" ;;
|
||||
"bin/rndc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/rndc/Makefile" ;;
|
||||
"bin/tests/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/Makefile" ;;
|
||||
"bin/tests/dst/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Makefile" ;;
|
||||
"bin/tests/dst/Kdh.+002+18602.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Kdh.+002+18602.key" ;;
|
||||
"bin/tests/dst/Kdh.+002+18602.private") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Kdh.+002+18602.private" ;;
|
||||
"bin/tests/dst/Kdh.+002+48957.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Kdh.+002+48957.key" ;;
|
||||
"bin/tests/dst/Kdh.+002+48957.private") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Kdh.+002+48957.private" ;;
|
||||
"bin/tests/dst/Ktest.+001+00002.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+001+00002.key" ;;
|
||||
"bin/tests/dst/Ktest.+001+54622.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+001+54622.key" ;;
|
||||
"bin/tests/dst/Ktest.+001+54622.private") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+001+54622.private" ;;
|
||||
"bin/tests/dst/Ktest.+003+23616.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+003+23616.key" ;;
|
||||
"bin/tests/dst/Ktest.+003+23616.private") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+003+23616.private" ;;
|
||||
"bin/tests/dst/Ktest.+003+49667.key") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/Ktest.+003+49667.key" ;;
|
||||
"bin/tests/dst/dst_2_data") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/dst_2_data" ;;
|
||||
"bin/tests/dst/t2_data_1") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_data_1" ;;
|
||||
"bin/tests/dst/t2_data_2") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_data_2" ;;
|
||||
"bin/tests/dst/t2_dsasig") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_dsasig" ;;
|
||||
"bin/tests/dst/t2_rsasig") CONFIG_FILES="$CONFIG_FILES bin/tests/dst/t2_rsasig" ;;
|
||||
"bin/tests/headerdep_test.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/headerdep_test.sh" ;;
|
||||
"bin/tests/optional/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/optional/Makefile" ;;
|
||||
"bin/tests/pkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/pkcs11/Makefile" ;;
|
||||
|
16
configure.in
16
configure.in
@@ -5313,22 +5313,6 @@ AC_CONFIG_FILES([
|
||||
bin/python/isc/tests/policy_test.py
|
||||
bin/rndc/Makefile
|
||||
bin/tests/Makefile
|
||||
bin/tests/dst/Makefile
|
||||
bin/tests/dst/Kdh.+002+18602.key
|
||||
bin/tests/dst/Kdh.+002+18602.private
|
||||
bin/tests/dst/Kdh.+002+48957.key
|
||||
bin/tests/dst/Kdh.+002+48957.private
|
||||
bin/tests/dst/Ktest.+001+00002.key
|
||||
bin/tests/dst/Ktest.+001+54622.key
|
||||
bin/tests/dst/Ktest.+001+54622.private
|
||||
bin/tests/dst/Ktest.+003+23616.key
|
||||
bin/tests/dst/Ktest.+003+23616.private
|
||||
bin/tests/dst/Ktest.+003+49667.key
|
||||
bin/tests/dst/dst_2_data
|
||||
bin/tests/dst/t2_data_1
|
||||
bin/tests/dst/t2_data_2
|
||||
bin/tests/dst/t2_dsasig
|
||||
bin/tests/dst/t2_rsasig
|
||||
bin/tests/headerdep_test.sh
|
||||
bin/tests/optional/Makefile
|
||||
bin/tests/pkcs11/Makefile
|
||||
|
@@ -10,6 +10,7 @@ tp: dbversion_test
|
||||
tp: dh_test
|
||||
tp: dispatch_test
|
||||
tp: dnstap_test
|
||||
tp: dst_test
|
||||
tp: dstrandom_test
|
||||
tp: geoip_test
|
||||
tp: gost_test
|
||||
|
@@ -38,6 +38,7 @@ SRCS = acl_test.c \
|
||||
dh_test.c \
|
||||
dispatch_test.c \
|
||||
dnstap_test.c \
|
||||
dst_test.c \
|
||||
dnstest.c \
|
||||
dstrandom_test.c \
|
||||
geoip_test.c \
|
||||
@@ -70,6 +71,7 @@ TARGETS = acl_test@EXEEXT@ \
|
||||
dh_test@EXEEXT@ \
|
||||
dispatch_test@EXEEXT@ \
|
||||
dnstap_test@EXEEXT@ \
|
||||
dst_test@EXEEXT@ \
|
||||
dstrandom_test@EXEEXT@ \
|
||||
geoip_test@EXEEXT@ \
|
||||
gost_test@EXEEXT@ \
|
||||
@@ -134,6 +136,11 @@ dnstap_test@EXEEXT@: dnstap_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||
dnstap_test.@O@ dnstest.@O@ ${DNSLIBS} \
|
||||
${ISCLIBS} ${LIBS}
|
||||
|
||||
dst_test@EXEEXT@: dst_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
|
||||
dst_test.@O@ dnstest.@O@ ${DNSLIBS} \
|
||||
${ISCLIBS} ${LIBS}
|
||||
|
||||
geoip_test@EXEEXT@: geoip_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
|
||||
geoip_test.@O@ dnstest.@O@ ${DNSLIBS} \
|
||||
|
263
lib/dns/tests/dst_test.c
Normal file
263
lib/dns/tests/dst_test.c
Normal file
@@ -0,0 +1,263 @@
|
||||
/*
|
||||
* Copyright (C) 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/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* ! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <atf-c.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <isc/file.h>
|
||||
#include <isc/util.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "../dst_internal.h"
|
||||
|
||||
#include "dnstest.h"
|
||||
|
||||
ATF_TC(sig);
|
||||
ATF_TC_HEAD(sig, tc) {
|
||||
atf_tc_set_md_var(tc, "descr", "signature ineffability");
|
||||
}
|
||||
|
||||
/*
|
||||
* Read sig in file at path to buf.
|
||||
*/
|
||||
static isc_result_t
|
||||
sig_fromfile(const char *path, isc_buffer_t *buf) {
|
||||
isc_result_t result;
|
||||
size_t rval, len;
|
||||
FILE *fp = NULL;
|
||||
unsigned char val;
|
||||
char *p, *data;
|
||||
off_t size;
|
||||
|
||||
result = isc_stdio_open(path, "rb", &fp);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
result = isc_file_getsizefd(fileno(fp), &size);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
data = isc_mem_get(mctx, (size + 1));
|
||||
ATF_REQUIRE(data != NULL);
|
||||
|
||||
len = (size_t)size;
|
||||
p = data;
|
||||
while (len != 0U) {
|
||||
result = isc_stdio_read(p, 1, len, fp, &rval);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
len -= rval;
|
||||
p += rval;
|
||||
}
|
||||
isc_stdio_close(fp);
|
||||
|
||||
p = data;
|
||||
len = size;
|
||||
while (len > 0U) {
|
||||
if ((*p == '\r') || (*p == '\n')) {
|
||||
++p;
|
||||
--len;
|
||||
continue;
|
||||
} else if (len < 2U)
|
||||
goto err;
|
||||
if (('0' <= *p) && (*p <= '9')) {
|
||||
val = *p - '0';
|
||||
} else if (('A' <= *p) && (*p <= 'F')) {
|
||||
val = *p - 'A' + 10;
|
||||
} else {
|
||||
result = ISC_R_BADHEX;
|
||||
goto err;
|
||||
}
|
||||
++p;
|
||||
val <<= 4;
|
||||
--len;
|
||||
if (('0' <= *p) && (*p <= '9')) {
|
||||
val |= (*p - '0');
|
||||
} else if (('A' <= *p) && (*p <= 'F')) {
|
||||
val |= (*p - 'A' + 10);
|
||||
} else {
|
||||
result = ISC_R_BADHEX;
|
||||
goto err;
|
||||
}
|
||||
++p;
|
||||
--len;
|
||||
isc_buffer_putuint8(buf, val);
|
||||
}
|
||||
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
err:
|
||||
isc_mem_put(mctx, data, size + 1);
|
||||
return (result);
|
||||
}
|
||||
|
||||
static void
|
||||
check_sig(const char *datapath, const char *sigpath, const char *keyname,
|
||||
dns_keytag_t id, dns_secalg_t alg, int type, isc_boolean_t expect)
|
||||
{
|
||||
isc_result_t result;
|
||||
size_t rval, len;
|
||||
FILE *fp;
|
||||
dst_key_t *key = NULL;
|
||||
unsigned char sig[512];
|
||||
unsigned char *p;
|
||||
unsigned char *data;
|
||||
off_t size;
|
||||
isc_buffer_t b;
|
||||
isc_buffer_t databuf, sigbuf;
|
||||
isc_region_t datareg, sigreg;
|
||||
dns_fixedname_t fname;
|
||||
dns_name_t *name;
|
||||
dst_context_t *ctx = NULL;
|
||||
|
||||
/*
|
||||
* Read data from file in a form usable by dst_verify.
|
||||
*/
|
||||
result = isc_stdio_open(datapath, "rb", &fp);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
result = isc_file_getsizefd(fileno(fp), &size);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
data = isc_mem_get(mctx, (size + 1));
|
||||
ATF_REQUIRE(data != NULL);
|
||||
|
||||
p = data;
|
||||
len = (size_t)size;
|
||||
do {
|
||||
result = isc_stdio_read(p, 1, len, fp, &rval);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
len -= rval;
|
||||
p += rval;
|
||||
} while (len);
|
||||
isc_stdio_close(fp);
|
||||
|
||||
/*
|
||||
* Read key from file in a form usable by dst_verify.
|
||||
*/
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
isc_buffer_constinit(&b, keyname, strlen(keyname));
|
||||
isc_buffer_add(&b, strlen(keyname));
|
||||
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
result = dst_key_fromfile(name, id, alg, type, "testdata/dst",
|
||||
mctx, &key);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
isc_buffer_init(&databuf, data, (unsigned int)size);
|
||||
isc_buffer_add(&databuf, (unsigned int)size);
|
||||
isc_buffer_usedregion(&databuf, &datareg);
|
||||
|
||||
memset(sig, 0, sizeof(sig));
|
||||
isc_buffer_init(&sigbuf, sig, sizeof(sig));
|
||||
|
||||
/*
|
||||
* Read precomputed signature from file in a form usable by dst_verify.
|
||||
*/
|
||||
result = sig_fromfile(sigpath, &sigbuf);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* Verify that the key signed the data.
|
||||
*/
|
||||
isc_buffer_remainingregion(&sigbuf, &sigreg);
|
||||
|
||||
result = dst_context_create3(key, mctx, DNS_LOGCATEGORY_GENERAL,
|
||||
ISC_FALSE, &ctx);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
result = dst_context_adddata(ctx, &datareg);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
result = dst_context_verify(ctx, &sigreg);
|
||||
|
||||
ATF_REQUIRE((expect && (result == ISC_R_SUCCESS)) ||
|
||||
(!expect && (result != ISC_R_SUCCESS)));
|
||||
|
||||
|
||||
isc_mem_put(mctx, data, size + 1);
|
||||
dst_context_destroy(&ctx);
|
||||
dst_key_free(&key);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ATF_TC_BODY(sig, tc) {
|
||||
isc_result_t result;
|
||||
|
||||
UNUSED(tc);
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
struct {
|
||||
const char *datapath;
|
||||
const char *sigpath;
|
||||
const char *keyname;
|
||||
dns_keytag_t keyid;
|
||||
dns_secalg_t alg;
|
||||
isc_boolean_t expect;
|
||||
} testcases[] = {
|
||||
{
|
||||
"testdata/dst/test1.data",
|
||||
"testdata/dst/test1.dsasig",
|
||||
"test.", 23616, DST_ALG_DSA, ISC_TRUE
|
||||
},
|
||||
{
|
||||
"testdata/dst/test1.data",
|
||||
"testdata/dst/test1.rsasig",
|
||||
"test.", 54622, DST_ALG_RSAMD5, ISC_TRUE
|
||||
},
|
||||
{
|
||||
/* wrong sig */
|
||||
"testdata/dst/test1.data",
|
||||
"testdata/dst/test1.dsasig",
|
||||
"test.", 54622, DST_ALG_RSAMD5, ISC_FALSE
|
||||
},
|
||||
{
|
||||
/* wrong data */
|
||||
"testdata/dst/test2.data",
|
||||
"testdata/dst/test1.dsasig",
|
||||
"test.", 23616, DST_ALG_DSA, ISC_FALSE
|
||||
},
|
||||
};
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < (sizeof(testcases)/sizeof(testcases[0])); i++) {
|
||||
if (!dst_algorithm_supported(testcases[i].alg)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
check_sig(testcases[i].datapath,
|
||||
testcases[i].sigpath,
|
||||
testcases[i].keyname,
|
||||
testcases[i].keyid,
|
||||
testcases[i].alg,
|
||||
DST_TYPE_PRIVATE|DST_TYPE_PUBLIC,
|
||||
testcases[i].expect);
|
||||
}
|
||||
|
||||
dns_test_end();
|
||||
}
|
||||
|
||||
/*
|
||||
* Main
|
||||
*/
|
||||
ATF_TP_ADD_TCS(tp) {
|
||||
ATF_TP_ADD_TC(tp, sig);
|
||||
|
||||
return (atf_no_error());
|
||||
}
|
@@ -3,4 +3,3 @@ FF66AB866EF0BDB0F515001E234E699B
|
||||
F5CD6FB41FB15D4213705ABE9B563896
|
||||
2196228648E0F8AA7F2F4EED3C19165C
|
||||
1B4C70C9D69B93A1F2BE5B2F948CE023
|
||||
|
@@ -344,33 +344,6 @@
|
||||
./bin/tests/byaddr_test.c C 2000,2001,2002,2004,2005,2007,2012,2015,2016,2018
|
||||
./bin/tests/byname_test.c C 2000,2001,2004,2005,2007,2009,2012,2015,2016,2017,2018
|
||||
./bin/tests/cfg_test.c C 2001,2002,2004,2005,2007,2009,2010,2011,2015,2016,2018
|
||||
./bin/tests/db_test.c C 1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2013,2015,2016,2017,2018
|
||||
./bin/tests/dst/.gitignore X 2012,2013,2018
|
||||
./bin/tests/dst/Kdh.+002+18602.key.in X 2001,2013,2018
|
||||
./bin/tests/dst/Kdh.+002+18602.private.in X 2001,2013,2018
|
||||
./bin/tests/dst/Kdh.+002+48957.key.in X 2001,2013,2018
|
||||
./bin/tests/dst/Kdh.+002+48957.private.in X 2001,2013,2018
|
||||
./bin/tests/dst/Ktest.+001+00002.key.in X 2001,2004,2013,2018
|
||||
./bin/tests/dst/Ktest.+001+54622.key.in X 1999,2000,2001,2004,2013,2018
|
||||
./bin/tests/dst/Ktest.+001+54622.private.in X 1999,2000,2001,2013,2018
|
||||
./bin/tests/dst/Ktest.+003+23616.key.in X 2001,2004,2013,2018
|
||||
./bin/tests/dst/Ktest.+003+23616.private.in X 2001,2013,2018
|
||||
./bin/tests/dst/Ktest.+003+49667.key.in X 2001,2004,2013,2018
|
||||
./bin/tests/dst/Makefile.in MAKE 1999,2000,2001,2002,2004,2006,2007,2008,2009,2010,2012,2013,2014,2016,2017,2018
|
||||
./bin/tests/dst/dst_2_data.in X 1999,2000,2001,2013,2018
|
||||
./bin/tests/dst/dst_test.c C 1999,2000,2001,2004,2005,2007,2009,2012,2014,2015,2016,2018
|
||||
./bin/tests/dst/gsstest.c C 2006,2007,2009,2010,2011,2013,2014,2015,2016,2018
|
||||
./bin/tests/dst/t2_data_1.in X 1999,2000,2001,2013,2018
|
||||
./bin/tests/dst/t2_data_2.in X 1999,2000,2001,2013,2018
|
||||
./bin/tests/dst/t2_dsasig.in X 1999,2000,2001,2013,2018
|
||||
./bin/tests/dst/t2_rsasig.in X 1999,2000,2001,2013,2018
|
||||
./bin/tests/dst/t_dst.c C 1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2013,2014,2016,2017,2018
|
||||
./bin/tests/dst/win32/REQUIRE_EXTENDED_DIR X 2013,2018
|
||||
./bin/tests/dst/win32/t_dst.vcxproj.filters.in X 2013,2015,2018
|
||||
./bin/tests/dst/win32/t_dst.vcxproj.in X 2013,2015,2016,2017,2018
|
||||
./bin/tests/dst/win32/t_dst.vcxproj.user X 2013,2018
|
||||
./bin/tests/entropy2_test.c C 2000,2001,2004,2005,2007,2015,2016,2018
|
||||
./bin/tests/entropy_test.c C 2000,2001,2004,2005,2007,2015,2016,2018
|
||||
./bin/tests/fromhex.pl PERL 2015,2016,2018
|
||||
./bin/tests/fsaccess_test.c C 2000,2001,2004,2005,2007,2012,2015,2016,2018
|
||||
./bin/tests/hash_test.c C 2000,2001,2004,2005,2006,2007,2014,2015,2016,2017,2018
|
||||
@@ -387,7 +360,42 @@
|
||||
./bin/tests/named.conf CONF-C 1999,2000,2001,2004,2007,2011,2015,2016,2018
|
||||
./bin/tests/ndc.conf CONF-C 2000,2001,2004,2007,2016,2018
|
||||
./bin/tests/ndc.conf-include CONF-C 2001,2004,2007,2016,2018
|
||||
./bin/tests/nsecify.c C 1999,2000,2001,2003,2004,2007,2008,2009,2011,2015,2016,2017,2018
|
||||
./bin/tests/optional/Kchild.example.+003+04017.key X 2000,2001,2018
|
||||
./bin/tests/optional/Kchild.example.+003+04017.private X 2000,2001,2018
|
||||
./bin/tests/optional/Makefile.in MAKE 2018
|
||||
./bin/tests/optional/adb_test.c C 1999,2000,2001,2004,2005,2007,2009,2011,2012,2013,2015,2016,2018
|
||||
./bin/tests/optional/backtrace_test.c C 2009,2013,2015,2016,2018
|
||||
./bin/tests/optional/byaddr_test.c C 2000,2001,2002,2004,2005,2007,2012,2015,2016,2018
|
||||
./bin/tests/optional/byname_test.c C 2000,2001,2004,2005,2007,2009,2012,2015,2016,2017,2018
|
||||
./bin/tests/optional/db_test.c C 1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2013,2015,2016,2017,2018
|
||||
./bin/tests/optional/dst_test.c C 2018
|
||||
./bin/tests/optional/entropy2_test.c C 2000,2001,2004,2005,2007,2015,2016,2018
|
||||
./bin/tests/optional/entropy_test.c C 2000,2001,2004,2005,2007,2015,2016,2018
|
||||
./bin/tests/optional/fsaccess_test.c C 2000,2001,2004,2005,2007,2012,2015,2016,2018
|
||||
./bin/tests/optional/gsstest.c C 2018
|
||||
./bin/tests/optional/hash_test.c C 2000,2001,2004,2005,2006,2007,2014,2015,2016,2017,2018
|
||||
./bin/tests/optional/inter_test.c C 2000,2001,2003,2004,2005,2007,2008,2015,2016,2018
|
||||
./bin/tests/optional/keyboard_test.c C 2000,2001,2004,2005,2007,2015,2016,2018
|
||||
./bin/tests/optional/lex_test.c C 1998,1999,2000,2001,2004,2005,2007,2015,2016,2018
|
||||
./bin/tests/optional/lfsr_test.c C 1999,2000,2001,2004,2005,2007,2015,2016,2018
|
||||
./bin/tests/optional/log_test.c C 1999,2000,2001,2004,2007,2011,2014,2015,2016,2018
|
||||
./bin/tests/optional/master_test.c C 1999,2000,2001,2004,2007,2009,2015,2016,2017,2018
|
||||
./bin/tests/optional/mempool_test.c C 1999,2000,2001,2004,2007,2016,2018
|
||||
./bin/tests/optional/name_test.c C 1998,1999,2000,2001,2003,2004,2005,2007,2009,2015,2016,2017,2018
|
||||
./bin/tests/optional/nsecify.c C 1999,2000,2001,2003,2004,2007,2008,2009,2011,2015,2016,2017,2018
|
||||
./bin/tests/optional/ratelimiter_test.c C 1999,2000,2001,2004,2007,2015,2016,2018
|
||||
./bin/tests/optional/rbt_test.c C 1999,2000,2001,2004,2005,2007,2009,2011,2012,2014,2015,2016,2018
|
||||
./bin/tests/optional/rbt_test.out X 1999,2000,2001,2018
|
||||
./bin/tests/optional/rbt_test.txt SH 1999,2000,2001,2004,2007,2012,2016,2018
|
||||
./bin/tests/optional/rwlock_test.c C 1998,1999,2000,2001,2004,2005,2007,2013,2016,2017,2018
|
||||
./bin/tests/optional/serial_test.c C 1999,2000,2001,2003,2004,2007,2015,2016,2018
|
||||
./bin/tests/optional/shutdown_test.c C 1998,1999,2000,2001,2004,2007,2011,2013,2016,2017,2018
|
||||
./bin/tests/optional/sig0_test.c C 2000,2001,2004,2005,2007,2008,2009,2012,2015,2016,2018
|
||||
./bin/tests/optional/sock_test.c C 1998,1999,2000,2001,2004,2007,2008,2012,2013,2014,2015,2016,2017,2018
|
||||
./bin/tests/optional/sym_test.c C 1998,1999,2000,2001,2004,2005,2007,2015,2016,2018
|
||||
./bin/tests/optional/task_test.c C 1998,1999,2000,2001,2004,2007,2013,2014,2015,2016,2018
|
||||
./bin/tests/optional/timer_test.c C 1998,1999,2000,2001,2004,2007,2013,2014,2015,2016,2018
|
||||
./bin/tests/optional/zone_test.c C 1999,2000,2001,2002,2004,2005,2007,2009,2012,2014,2015,2016,2018
|
||||
./bin/tests/pkcs11/.gitignore X 2014,2018
|
||||
./bin/tests/pkcs11/Makefile.in MAKE 2014,2016,2018
|
||||
./bin/tests/pkcs11/README X 2014,2016,2018
|
||||
@@ -3481,6 +3489,7 @@
|
||||
./lib/dns/tests/dnstap_test.c C 2015,2016,2017,2018
|
||||
./lib/dns/tests/dnstest.c C 2011,2012,2013,2014,2015,2016,2017,2018
|
||||
./lib/dns/tests/dnstest.h C 2011,2012,2014,2015,2016,2017,2018
|
||||
./lib/dns/tests/dst_test.c C 2018
|
||||
./lib/dns/tests/dstrandom_test.c C 2017,2018
|
||||
./lib/dns/tests/geoip_test.c C 2013,2014,2015,2016,2017,2018
|
||||
./lib/dns/tests/gost_test.c C 2014,2015,2016,2017,2018
|
||||
@@ -3497,6 +3506,7 @@
|
||||
./lib/dns/tests/rdataset_test.c C 2012,2016,2018
|
||||
./lib/dns/tests/rdatasetstats_test.c C 2012,2015,2016,2018
|
||||
./lib/dns/tests/rsa_test.c C 2016,2018
|
||||
./lib/dns/tests/testdata/db/data.db ZONE 2018
|
||||
./lib/dns/tests/testdata/dbiterator/zone1.data ZONE 2011,2012,2016,2018
|
||||
./lib/dns/tests/testdata/dbiterator/zone2.data X 2011,2018
|
||||
./lib/dns/tests/testdata/diff/zone1.data ZONE 2011,2012,2016,2018
|
||||
@@ -3508,6 +3518,16 @@
|
||||
./lib/dns/tests/testdata/dnstap/query.recursive X 2015,2018
|
||||
./lib/dns/tests/testdata/dnstap/response.auth X 2015,2018
|
||||
./lib/dns/tests/testdata/dnstap/response.recursive X 2015,2018
|
||||
./lib/dns/tests/testdata/dst/Ktest.+001+00002.key X 2018
|
||||
./lib/dns/tests/testdata/dst/Ktest.+001+54622.key X 2018
|
||||
./lib/dns/tests/testdata/dst/Ktest.+001+54622.private X 2018
|
||||
./lib/dns/tests/testdata/dst/Ktest.+003+23616.key X 2018
|
||||
./lib/dns/tests/testdata/dst/Ktest.+003+23616.private X 2018
|
||||
./lib/dns/tests/testdata/dst/Ktest.+003+49667.key X 2018
|
||||
./lib/dns/tests/testdata/dst/test1.data X 2018
|
||||
./lib/dns/tests/testdata/dst/test1.dsasig X 2018
|
||||
./lib/dns/tests/testdata/dst/test1.rsasig X 2018
|
||||
./lib/dns/tests/testdata/dst/test2.data X 2018
|
||||
./lib/dns/tests/testdata/dstrandom/random.data X 2017,2018
|
||||
./lib/dns/tests/testdata/master/.gitignore X 2012,2018
|
||||
./lib/dns/tests/testdata/master/master1.data X 2011,2018
|
||||
|
@@ -116,8 +116,6 @@ my @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj",
|
||||
"..\\bin\\tools\\win32\\nsec3hash.vcxproj.filters",
|
||||
"..\\bin\\tools\\win32\\rrchecker.vcxproj",
|
||||
"..\\bin\\tools\\win32\\rrchecker.vcxproj.filters",
|
||||
"..\\bin\\tests\\dst\\win32\\t_dst.vcxproj",
|
||||
"..\\bin\\tests\\dst\\win32\\t_dst.vcxproj.filters",
|
||||
"..\\bin\\tests\\system\\win32\\bigkey.vcxproj",
|
||||
"..\\bin\\tests\\system\\win32\\bigkey.vcxproj.filters",
|
||||
"..\\bin\\tests\\system\\win32\\feature-test.vcxproj",
|
||||
|
@@ -496,19 +496,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk11tokens", "..\bin\pkcs11
|
||||
EndProjectSection
|
||||
EndProject
|
||||
@END PKCS11
|
||||
@IF TESTS
|
||||
@IF ATOMIC
|
||||
@END ATOMIC
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t_dst", "..\bin\tests\dst\win32\t_dst.vcxproj", "{EE9B94CF-7C33-4F3B-A674-FB756D422C54}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A3F71D12-F38A-4C77-8D87-8E8854CA74A1} = {A3F71D12-F38A-4C77-8D87-8E8854CA74A1}
|
||||
{3840E563-D180-4761-AA9C-E6155F02EAFF} = {3840E563-D180-4761-AA9C-E6155F02EAFF}
|
||||
{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} = {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}
|
||||
{F6F08940-7597-4FEE-9CE0-E09A009C45A3} = {F6F08940-7597-4FEE-9CE0-E09A009C45A3}
|
||||
{B4AC7F81-E3DC-43E9-B339-4FA5149FA8F7} = {B4AC7F81-E3DC-43E9-B339-4FA5149FA8F7}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
@END TESTS
|
||||
@IF XTESTS
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "backtrace_test", "..\bin\tests\win32\backtrace_test.vcxproj", "{14751171-C40E-40EE-A2F0-37FFC3CCD4A2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
|
Reference in New Issue
Block a user