chiark / gitweb /
Makefile: Better signature corruption.
[dnserr] / Makefile
index d1c66539ecea9031d9012e97ad09f5c56df9c3f7..b134f09108a15e291e227d9600c540a08ea8b885 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,16 @@ dnserr.zone.sig: dnserr.zone.sigold dnserr.zone.signew
                if (!doneoldsig) { system("cat t.oldsig"); doneoldsig = 1; } \
                next; \
             } \
-               { gsub(/invalid-rrsigx/, "invalid-rrsig"); print; }' \
+            $(BADSIGMATCH) { \
+               s = $$13; \
+               for (i = length(s)/2; i >= 0; i--) { \
+                 c = substr(s, i, 1); \
+                 if (c != tolower(c)) { c = tolower(c); break; } \
+                 else if (c != toupper(c)) { c = toupper(c); break; } \
+               } \
+               $$13 = substr(s, 0, i) c substr(s, i + 1); \
+            } \
+            { print; }' \
                dnserr.zone.signew >$@.new
        rm t.oldsig
        mv $@.new $@