2009-03-03 21:42:31 -05:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
#
|
2017-02-02 18:46:34 -05:00
|
|
|
# Copyright (C) 2009-2012, 2014, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
|
2012-06-28 21:39:47 -04:00
|
|
|
#
|
2016-06-27 00:56:38 -04:00
|
|
|
# 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/.
|
2009-03-03 21:42:31 -05:00
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
use warnings;
|
|
|
|
|
|
2009-09-01 03:14:26 -04:00
|
|
|
my $lines;
|
2009-03-03 21:42:31 -05:00
|
|
|
while (<>) {
|
|
|
|
|
chomp;
|
2010-06-20 03:18:30 -04:00
|
|
|
if (/\/\* .Id:.* \*\//) {
|
2011-01-03 18:45:08 -05:00
|
|
|
next;
|
2010-06-20 03:18:30 -04:00
|
|
|
}
|
2009-03-03 21:42:31 -05:00
|
|
|
s/\"/\\\"/g;
|
|
|
|
|
s/$/\\n\\/;
|
|
|
|
|
$lines .= $_ . "\n";
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-01 03:14:26 -04:00
|
|
|
my $mkey = '#define MANAGED_KEYS "\\' . "\n" . $lines . "\"\n";
|
|
|
|
|
|
|
|
|
|
$lines =~ s/managed-keys/trusted-keys/;
|
2011-01-03 18:45:08 -05:00
|
|
|
$lines =~ s/\s+initial-key//g;
|
2009-09-01 03:14:26 -04:00
|
|
|
my $tkey = '#define TRUSTED_KEYS "\\' . "\n" . $lines . "\"\n";
|
|
|
|
|
|
|
|
|
|
print $tkey;
|
|
|
|
|
print "\n";
|
|
|
|
|
print $mkey;
|