1#!/usr/bin/perl 2# 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, you can obtain one at https://mozilla.org/MPL/2.0/. 8# 9# See the COPYRIGHT file distributed with this work for additional 10# information regarding copyright ownership. 11 12use strict; 13use warnings; 14 15my $target = shift; 16my $notbefore; 17my $inception; 18while (<>) { 19 $notbefore = $1 if m{^.* must not be signed before \d+ [(](\d+)[)]}; 20 $inception = $1 if m{^.* inception time \d+ [(](\d+)[)]}; 21} 22die "missing notbefore time" unless $notbefore; 23die "missing inception time" unless $inception; 24my $delta = $inception - $notbefore; 25die "bad inception time $delta" unless abs($delta - $target) < 3; 26