3 BASE
= distorted.org.uk
6 KEYGEN
= dnssec-keygen
-aRSASHA256
-b1024
-r
/dev
/urandom
-Kkey
/
7 SIGNZONE
= dnssec-signzone
-S
-Kkey
/ -dds
/
8 SIGVALID
= -s20000101000000
-e20300101000000
9 SIGOLD
= -s20000101000000
-e20010101000000
13 DUMMY
= refused wrong-ds
14 DUMMYZONES
= $(addsuffix .zone
,$(DUMMY
))
15 TARGETS
+= $(DUMMYZONES
)
16 $(DUMMYZONES
): %.zone
: utils.m4 config.m4 dummy.in
17 m4
-P
-DBASE
=$(BASE
) >$@.new utils.m4 dummy.in
20 TARGETS
+= dnserr.zone
21 dnserr.zone
: utils.m4 config.m4 dnserr.in
22 m4
-P
-DBASE
=$(BASE
) >$@.new utils.m4 dnserr.in
25 KEYSTAMP
= $(patsubst %,key
/%.stamp
, \
27 $(addsuffix .
$(ZONE
),$(DUMMY
)))
28 $(KEYSTAMP
): key
/%.stamp
:
34 realclean::; rm -rf key
/
36 DUMMYSIG
= $(addsuffix .zone.sig
,$(DUMMY
))
37 TARGETS
+= $(DUMMYSIG
)
38 $(DUMMYSIG
): %.zone.sig
: %.zone
39 wrong-ds.zone.sig
: wrong-ds.zone key
/wrong-ds.
$(ZONE
).stamp
41 $(SIGNZONE
) $(SIGVALID
) -owrong-ds.
$(ZONE
) -f
$@
$<
44 TARGETS
+= dnserr.zone.signew
45 dnserr.zone.signew
: dnserr.zone key
/$(ZONE
).stamp
46 $(SIGNZONE
) $(SIGVALID
) -o
$(ZONE
) -f
$@.bind
$<
47 ldns-read-zone
$@.bind
>$@.new
51 TARGETS
+= dnserr.zone.sigold
52 dnserr.zone.sigold
: dnserr.zone key
/$(ZONE
).stamp
53 $(SIGNZONE
) $(SIGOLD
) -P
-o
$(ZONE
) -f
$@.bind
$<
54 ldns-read-zone
$@.bind
>$@.new
58 TARGETS
+= dnserr.zone.sig
59 OLDSIGMATCH
= $$1 == "expired-rrsig.$(ZONE)." && \
60 $$4 == "RRSIG" && ($$5 == "A" ||
$$5 == "AAAA")
61 BADSIGMATCH
= $$1 == "invalid-rrsig.$(ZONE)." && \
62 $$4 == "RRSIG" && ($$5 == "A" ||
$$5 == "AAAA")
64 dnserr.zone.sig
: dnserr.zone.sigold dnserr.zone.signew
65 awk
'$(OLDSIGMATCH) { print; }' \
66 dnserr.zone.sigold
>t.oldsig
67 awk
'$(OLDSIGMATCH) { \
68 if (!doneoldsig) { system("cat t.oldsig"); doneoldsig = 1; } \
73 for (i = length(s)/2; i > 0; i--) { \
74 c = substr(s, i, 1); \
75 if (c != tolower(c)) { c = tolower(c); break; } \
76 else if (c != toupper(c)) { c = toupper(c); break; } \
78 $$13 = substr(s, 1, i - 1) c substr(s, i + 1); \
81 dnserr.zone.signew
>$@.new
89 clean::; rm -f
$(CLEAN
)
90 realclean:: clean; rm -f
$(REALCLEAN
)
91 .PHONY
: clean realclean