From cfcf5437f49a02949644b5e26b591e714551bd28 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 29 Aug 2017 08:48:19 +0000 Subject: [PATCH] - new keys and certs for dnscrypt tests. git-svn-id: file:///svn/unbound/trunk@4318 be551aaa-1e26-0410-a405-d3ace91eadb9 --- dnscrypt/testdata/gencert.sh | 38 ++++++++++++++++++ dnscrypt/testdata/keys1/public.key | 1 + dnscrypt/testdata/keys1/secret.key | 1 + dnscrypt/testdata/keys2/public.key | 1 + dnscrypt/testdata/keys2/secret.key | 1 + doc/Changelog | 1 + testdata/dnscrypt_cert.tdir/1.key | Bin 32 -> 32 bytes testdata/dnscrypt_cert.tdir/1_chacha.cert | Bin 0 -> 124 bytes testdata/dnscrypt_cert.tdir/1_salsa.cert | Bin 0 -> 124 bytes testdata/dnscrypt_cert.tdir/2.key | 3 +- testdata/dnscrypt_cert.tdir/2_chacha.cert | Bin 0 -> 124 bytes testdata/dnscrypt_cert.tdir/2_salsa.cert | Bin 0 -> 124 bytes testdata/dnscrypt_cert_chacha.tdir/1.key | Bin 32 -> 32 bytes .../dnscrypt_cert_chacha.tdir/1_chacha.cert | Bin 0 -> 124 bytes .../dnscrypt_cert_chacha.tdir/1_salsa.cert | Bin 0 -> 124 bytes testdata/dnscrypt_cert_chacha.tdir/2.key | 3 +- .../dnscrypt_cert_chacha.tdir/2_chacha.cert | Bin 124 -> 124 bytes .../dnscrypt_cert_chacha.tdir/2_salsa.cert | Bin 0 -> 124 bytes testdata/dnscrypt_queries.tdir/1.key | Bin 32 -> 32 bytes testdata/dnscrypt_queries.tdir/1_chacha.cert | Bin 0 -> 124 bytes testdata/dnscrypt_queries.tdir/1_salsa.cert | Bin 0 -> 124 bytes testdata/dnscrypt_queries.tdir/2.key | 3 +- testdata/dnscrypt_queries.tdir/2_chacha.cert | Bin 0 -> 124 bytes testdata/dnscrypt_queries.tdir/2_salsa.cert | Bin 0 -> 124 bytes testdata/dnscrypt_queries_chacha.tdir/1.key | 1 + .../1_chacha.cert | Bin 0 -> 124 bytes .../dnscrypt_queries_chacha.tdir/1_salsa.cert | Bin 0 -> 124 bytes testdata/dnscrypt_queries_chacha.tdir/2.key | 3 +- .../2_chacha.cert | Bin 124 -> 124 bytes .../dnscrypt_queries_chacha.tdir/2_salsa.cert | Bin 124 -> 124 bytes 30 files changed, 48 insertions(+), 8 deletions(-) create mode 100755 dnscrypt/testdata/gencert.sh create mode 100644 dnscrypt/testdata/keys1/public.key create mode 100644 dnscrypt/testdata/keys1/secret.key create mode 100644 dnscrypt/testdata/keys2/public.key create mode 100644 dnscrypt/testdata/keys2/secret.key create mode 100644 testdata/dnscrypt_cert.tdir/1_chacha.cert create mode 100644 testdata/dnscrypt_cert.tdir/1_salsa.cert create mode 100644 testdata/dnscrypt_cert.tdir/2_chacha.cert create mode 100644 testdata/dnscrypt_cert.tdir/2_salsa.cert create mode 100644 testdata/dnscrypt_cert_chacha.tdir/1_chacha.cert create mode 100644 testdata/dnscrypt_cert_chacha.tdir/1_salsa.cert create mode 100644 testdata/dnscrypt_cert_chacha.tdir/2_salsa.cert create mode 100644 testdata/dnscrypt_queries.tdir/1_chacha.cert create mode 100644 testdata/dnscrypt_queries.tdir/1_salsa.cert create mode 100644 testdata/dnscrypt_queries.tdir/2_chacha.cert create mode 100644 testdata/dnscrypt_queries.tdir/2_salsa.cert create mode 100644 testdata/dnscrypt_queries_chacha.tdir/1.key create mode 100644 testdata/dnscrypt_queries_chacha.tdir/1_chacha.cert create mode 100644 testdata/dnscrypt_queries_chacha.tdir/1_salsa.cert diff --git a/dnscrypt/testdata/gencert.sh b/dnscrypt/testdata/gencert.sh new file mode 100755 index 000000000..ae0b2311e --- /dev/null +++ b/dnscrypt/testdata/gencert.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +CERT_EXPIRE_DAYS="$(( 365 * 15 ))" +DIR="$(dirname "$0")" + + +if [[ "$PWD" != *tdir ]] +then + echo "You should run this script with a .tdir directory" + exit 1 +fi + +for i in 1 2 +do + # Ephemeral key + rm -f "${i}.key" + dnscrypt-wrapper --gen-crypt-keypair \ + --crypt-secretkey-file="${i}.key" \ + --provider-publickey-file="${DIR}/keys${i}/public.key" \ + --provider-secretkey-file="${DIR}/keys${i}/secret.key" + # Cert file + for cipher in salsa chacha + do + rm -f "${i}_${cipher}.cert" + extraarg="" + if [ "${cipher}" == "chacha" ] + then + extraarg="-x" + fi + + dnscrypt-wrapper ${extraarg} --gen-cert-file \ + --provider-cert-file="${i}_${cipher}.cert" \ + --crypt-secretkey-file="${i}.key" \ + --provider-publickey-file="${DIR}/keys${i}/public.key" \ + --provider-secretkey-file="${DIR}/keys${i}/secret.key" \ + --cert-file-expire-days="${CERT_EXPIRE_DAYS}" + done +done diff --git a/dnscrypt/testdata/keys1/public.key b/dnscrypt/testdata/keys1/public.key new file mode 100644 index 000000000..45e6aadc3 --- /dev/null +++ b/dnscrypt/testdata/keys1/public.key @@ -0,0 +1 @@ +_AO#foD_eŶ)|'TO \ No newline at end of file diff --git a/dnscrypt/testdata/keys1/secret.key b/dnscrypt/testdata/keys1/secret.key new file mode 100644 index 000000000..7672c979b --- /dev/null +++ b/dnscrypt/testdata/keys1/secret.key @@ -0,0 +1 @@ +-&6\Uh`^"z/C9 _AO#foD_eŶ)|'TO \ No newline at end of file diff --git a/dnscrypt/testdata/keys2/public.key b/dnscrypt/testdata/keys2/public.key new file mode 100644 index 000000000..036b04aab --- /dev/null +++ b/dnscrypt/testdata/keys2/public.key @@ -0,0 +1 @@ +R e{lKˀ:5r\}K \ No newline at end of file diff --git a/dnscrypt/testdata/keys2/secret.key b/dnscrypt/testdata/keys2/secret.key new file mode 100644 index 000000000..687302956 --- /dev/null +++ b/dnscrypt/testdata/keys2/secret.key @@ -0,0 +1 @@ +i% 5 f͙ Bnͯ.R e{lKˀ:5r\}K \ No newline at end of file diff --git a/doc/Changelog b/doc/Changelog index e6c8e1976..bceebda65 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - Fix #1414: fix segfault on parse failure and log_replies. - zero qinfo in handle_request, this zeroes local_alias and also the qname member. + - new keys and certs for dnscrypt tests. 28 August 2017: Wouter - Fix #1415: patch to free dnscrypt environment on reload. diff --git a/testdata/dnscrypt_cert.tdir/1.key b/testdata/dnscrypt_cert.tdir/1.key index 7698961045e43d1143efe9607afaf273ebd11cc9..165262c86e53595308da836d0e8cb4d7b56b19a1 100644 GIT binary patch literal 32 qcmV+*0N?+v_TB7DtcN3!fHe7YjtOw+*7U*Vz<43KyAwf*B5h4P$`Pjk literal 32 ocmey$ed%!Gj%S73Y6nltK4K_$+Y;KCdbT`F@`OkB2Kc6nkT;%Z`>at>Uj9aQ{^>>p6yw{<#d9ddA`K_|5h54 zZY=O}n8R$k=uBeKY^nAImXoaS@G?$Vu!{e%^nRn$8(ajoq#n!YsJ>Bb9h_nmH|rs* Zjezr6?cm#vN1*bN3$9y$aOtJnI{=8hINSgL literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_cert.tdir/1_salsa.cert b/testdata/dnscrypt_cert.tdir/1_salsa.cert new file mode 100644 index 0000000000000000000000000000000000000000..17e447fc339b7e1d19d078e43cdf685cacacc6a6 GIT binary patch literal 124 zcmZ?q3wCB;WMIgAwlO39lENChev9wxW`*9^Gh<>UL+HN?+Y6ln=LrYz-7<~Wd%>L_ zZ)6gh*IiQ-jL1GUW3N=mgDslsmZehtEKG-`_Zyww;3BXk^;kwn^^Icd;1r{{Sr1ul Y1f0)m2j6yt$ww|Y%?ZM#m(F(r0G>)XPXGV_ literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_cert.tdir/2.key b/testdata/dnscrypt_cert.tdir/2.key index ae385c068..c299f550a 100644 --- a/testdata/dnscrypt_cert.tdir/2.key +++ b/testdata/dnscrypt_cert.tdir/2.key @@ -1,2 +1 @@ -`j0uxt[ -]uR@;f]Z< \ No newline at end of file +m7x;%׸*RӯmD \ No newline at end of file diff --git a/testdata/dnscrypt_cert.tdir/2_chacha.cert b/testdata/dnscrypt_cert.tdir/2_chacha.cert new file mode 100644 index 0000000000000000000000000000000000000000..ed4ec26065a60f958ac8797b0515f692e2561152 GIT binary patch literal 124 zcmZ?q3wCB;VqjQp_UOOX7bc&L>5}pFB|+1_1)bhB^9Ng}QrFrVcYU1&Gx)jI?6{M# z{^oz3MM9f&Q`o;{8!&rDpDmZtJmbW)kn8K`@cnzEZd|I6JoA0+Vn2LPf}JkrbK?xa|s(C2#RraymOa5q+ zm`UrFB~;fg48Qo~I@8&j^IF`CRMuaLX8Za%eE;648<#31&wO9|xTH&HQQeHcm*uNs Ym~u@y{yi{($ww|Y%?ZM#m(F(r03OOaw*UYD literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_cert_chacha.tdir/1.key b/testdata/dnscrypt_cert_chacha.tdir/1.key index 7698961045e43d1143efe9607afaf273ebd11cc9..165262c86e53595308da836d0e8cb4d7b56b19a1 100644 GIT binary patch literal 32 qcmV+*0N?+v_TB7DtcN3!fHe7YjtOw+*7U*Vz<43KyAwf*B5h4P$`Pjk literal 32 ocmey$ed%!Gj%S73Y6nltK4K_$+Y;KCdbT`F@`OkB2Kc6nkT;%Z`>at>Uj9aQ{^>>p6yw{<#d9ddA`K_|5h54 zZY=O}n8R$k=uBeKY^nAImXoaS@G?$Vu!{e%^nRn$8(ajoq#n!YsJ>Bb9h_nmH|rs* Zjezr6?cm#vN1*bN3$9y$aOtJnI{=8hINSgL literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_cert_chacha.tdir/1_salsa.cert b/testdata/dnscrypt_cert_chacha.tdir/1_salsa.cert new file mode 100644 index 0000000000000000000000000000000000000000..17e447fc339b7e1d19d078e43cdf685cacacc6a6 GIT binary patch literal 124 zcmZ?q3wCB;WMIgAwlO39lENChev9wxW`*9^Gh<>UL+HN?+Y6ln=LrYz-7<~Wd%>L_ zZ)6gh*IiQ-jL1GUW3N=mgDslsmZehtEKG-`_Zyww;3BXk^;kwn^^Icd;1r{{Sr1ul Y1f0)m2j6yt$ww|Y%?ZM#m(F(r0G>)XPXGV_ literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_cert_chacha.tdir/2.key b/testdata/dnscrypt_cert_chacha.tdir/2.key index ae385c068..c299f550a 100644 --- a/testdata/dnscrypt_cert_chacha.tdir/2.key +++ b/testdata/dnscrypt_cert_chacha.tdir/2.key @@ -1,2 +1 @@ -`j0uxt[ -]uR@;f]Z< \ No newline at end of file +m7x;%׸*RӯmD \ No newline at end of file diff --git a/testdata/dnscrypt_cert_chacha.tdir/2_chacha.cert b/testdata/dnscrypt_cert_chacha.tdir/2_chacha.cert index 9466220ab5033bbc30cff28628b822f0d83c4477..ed4ec26065a60f958ac8797b0515f692e2561152 100644 GIT binary patch literal 124 zcmZ?q3wCB;VqjQp_UOOX7bc&L>5}pFB|+1_1)bhB^9Ng}QrFrVcYU1&Gx)jI?6{M# z{^oz3MM9f&Q`o;{8!&rDpDmZtJmbW)kn8K`@cnzEZd|I6JoA0+Vn2LPf}Jk zOZ-j=T;0yowQ$>+d3tf&QGv{&CVo|y82ifh1sz<@ovw85(yN+_uf%WsOm$sc&@ZlO YGIe9EL7iDYR6gRw^93LrwMtq6026dLX8-^I diff --git a/testdata/dnscrypt_cert_chacha.tdir/2_salsa.cert b/testdata/dnscrypt_cert_chacha.tdir/2_salsa.cert new file mode 100644 index 0000000000000000000000000000000000000000..6e71fe97864d8d63c56bcd3ccf384f98b765f13c GIT binary patch literal 124 zcmZ?q3wCB;WMFWNkU#nPq>rbK?xa|s(C2#RraymOa5q+ zm`UrFB~;fg48Qo~I@8&j^IF`CRMuaLX8Za%eE;648<#31&wO9|xTH&HQQeHcm*uNs Ym~u@y{yi{($ww|Y%?ZM#m(F(r03OOaw*UYD literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_queries.tdir/1.key b/testdata/dnscrypt_queries.tdir/1.key index 7698961045e43d1143efe9607afaf273ebd11cc9..165262c86e53595308da836d0e8cb4d7b56b19a1 100644 GIT binary patch literal 32 qcmV+*0N?+v_TB7DtcN3!fHe7YjtOw+*7U*Vz<43KyAwf*B5h4P$`Pjk literal 32 ocmey$ed%!Gj%S73Y6nltK4K_$+Y;KCdbT`F@`OkB2Kc6nkT;%Z`>at>Uj9aQ{^>>p6yw{<#d9ddA`K_|5h54 zZY=O}n8R$k=uBeKY^nAImXoaS@G?$Vu!{e%^nRn$8(ajoq#n!YsJ>Bb9h_nmH|rs* Zjezr6?cm#vN1*bN3$9y$aOtJnI{=8hINSgL literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_queries.tdir/1_salsa.cert b/testdata/dnscrypt_queries.tdir/1_salsa.cert new file mode 100644 index 0000000000000000000000000000000000000000..17e447fc339b7e1d19d078e43cdf685cacacc6a6 GIT binary patch literal 124 zcmZ?q3wCB;WMIgAwlO39lENChev9wxW`*9^Gh<>UL+HN?+Y6ln=LrYz-7<~Wd%>L_ zZ)6gh*IiQ-jL1GUW3N=mgDslsmZehtEKG-`_Zyww;3BXk^;kwn^^Icd;1r{{Sr1ul Y1f0)m2j6yt$ww|Y%?ZM#m(F(r0G>)XPXGV_ literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_queries.tdir/2.key b/testdata/dnscrypt_queries.tdir/2.key index ae385c068..c299f550a 100644 --- a/testdata/dnscrypt_queries.tdir/2.key +++ b/testdata/dnscrypt_queries.tdir/2.key @@ -1,2 +1 @@ -`j0uxt[ -]uR@;f]Z< \ No newline at end of file +m7x;%׸*RӯmD \ No newline at end of file diff --git a/testdata/dnscrypt_queries.tdir/2_chacha.cert b/testdata/dnscrypt_queries.tdir/2_chacha.cert new file mode 100644 index 0000000000000000000000000000000000000000..ed4ec26065a60f958ac8797b0515f692e2561152 GIT binary patch literal 124 zcmZ?q3wCB;VqjQp_UOOX7bc&L>5}pFB|+1_1)bhB^9Ng}QrFrVcYU1&Gx)jI?6{M# z{^oz3MM9f&Q`o;{8!&rDpDmZtJmbW)kn8K`@cnzEZd|I6JoA0+Vn2LPf}JkrbK?xa|s(C2#RraymOa5q+ zm`UrFB~;fg48Qo~I@8&j^IF`CRMuaLX8Za%eE;648<#31&wO9|xTH&HQQeHcm*uNs Ym~u@y{yi{($ww|Y%?ZM#m(F(r03OOaw*UYD literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_queries_chacha.tdir/1.key b/testdata/dnscrypt_queries_chacha.tdir/1.key new file mode 100644 index 000000000..165262c86 --- /dev/null +++ b/testdata/dnscrypt_queries_chacha.tdir/1.key @@ -0,0 +1 @@ +K#4s px!A"mM \ No newline at end of file diff --git a/testdata/dnscrypt_queries_chacha.tdir/1_chacha.cert b/testdata/dnscrypt_queries_chacha.tdir/1_chacha.cert new file mode 100644 index 0000000000000000000000000000000000000000..3da5c612d06020c86edda3d99a31d9d44c20cd26 GIT binary patch literal 124 zcmZ?q3wCB;VqjRK{Q6Xq>2Kc6nkT;%Z`>at>Uj9aQ{^>>p6yw{<#d9ddA`K_|5h54 zZY=O}n8R$k=uBeKY^nAImXoaS@G?$Vu!{e%^nRn$8(ajoq#n!YsJ>Bb9h_nmH|rs* Zjezr6?cm#vN1*bN3$9y$aOtJnI{=8hINSgL literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_queries_chacha.tdir/1_salsa.cert b/testdata/dnscrypt_queries_chacha.tdir/1_salsa.cert new file mode 100644 index 0000000000000000000000000000000000000000..17e447fc339b7e1d19d078e43cdf685cacacc6a6 GIT binary patch literal 124 zcmZ?q3wCB;WMIgAwlO39lENChev9wxW`*9^Gh<>UL+HN?+Y6ln=LrYz-7<~Wd%>L_ zZ)6gh*IiQ-jL1GUW3N=mgDslsmZehtEKG-`_Zyww;3BXk^;kwn^^Icd;1r{{Sr1ul Y1f0)m2j6yt$ww|Y%?ZM#m(F(r0G>)XPXGV_ literal 0 HcmV?d00001 diff --git a/testdata/dnscrypt_queries_chacha.tdir/2.key b/testdata/dnscrypt_queries_chacha.tdir/2.key index ae385c068..c299f550a 100644 --- a/testdata/dnscrypt_queries_chacha.tdir/2.key +++ b/testdata/dnscrypt_queries_chacha.tdir/2.key @@ -1,2 +1 @@ -`j0uxt[ -]uR@;f]Z< \ No newline at end of file +m7x;%׸*RӯmD \ No newline at end of file diff --git a/testdata/dnscrypt_queries_chacha.tdir/2_chacha.cert b/testdata/dnscrypt_queries_chacha.tdir/2_chacha.cert index 9466220ab5033bbc30cff28628b822f0d83c4477..ed4ec26065a60f958ac8797b0515f692e2561152 100644 GIT binary patch literal 124 zcmZ?q3wCB;VqjQp_UOOX7bc&L>5}pFB|+1_1)bhB^9Ng}QrFrVcYU1&Gx)jI?6{M# z{^oz3MM9f&Q`o;{8!&rDpDmZtJmbW)kn8K`@cnzEZd|I6JoA0+Vn2LPf}Jk zOZ-j=T;0yowQ$>+d3tf&QGv{&CVo|y82ifh1sz<@ovw85(yN+_uf%WsOm$sc&@ZlO YGIe9EL7iDYR6gRw^93LrwMtq6026dLX8-^I diff --git a/testdata/dnscrypt_queries_chacha.tdir/2_salsa.cert b/testdata/dnscrypt_queries_chacha.tdir/2_salsa.cert index 1e98d0cd2a08ee7be4710455fe0586b4667012db..6e71fe97864d8d63c56bcd3ccf384f98b765f13c 100644 GIT binary patch literal 124 zcmZ?q3wCB;WMFWNkU#nPq>rbK?xa|s(C2#RraymOa5q+ zm`UrFB~;fg48Qo~I@8&j^IF`CRMuaLX8Za%eE;648<#31&wO9|xTH&HQQeHcm*uNs Ym~u@y{yi{($ww|Y%?ZM#m(F(r03OOaw*UYD literal 124 zcmZ?q3wCB;WMDY#Hs$qn%SQ{BCN5An@j5M&8QQ2cYkH^Fl3I(h7akmSvy6KuhRi!~ zu3Yl^fdv|A7Ax;8