NAME

Net::DNS::SEC::Private - DNSSEC Private key object

SYNOPSIS

use Net::DNS::SEC::Private;

$private = new Net::DNS::SEC::Private($keypath);

DESCRIPTION

Class representing private keys as read from a keyfile generated by dnssec-keygen. The class is written to be used only in the context of the Net::DNS::RR::RRSIG create method. This class is not designed to interact with any other system.

METHODS

new

    $private = new Net::DNS::SEC::Private (
		'/home/foo/Kexample.com.+001+11567.private'
		);

Creator method. The argument is the full path to a private key generated by the BIND dnssec-keygen tool. Note that the filename contains information about the algorithm and keyid.

private_key_format

$format = $private->private_key_format;

Returns a string which identifies the format of the private key file.

created, publish, activate

$created  = $private->created;
$publish  = $private->publish;
$activate = $private->activate;

Returns a string which represents a date in the form 20141212123456. Returns undefined value for key formats older than v1.3.

algorithm, keytag, signame

$algorithm = $private->algorithm;
$keytag    = $private->keytag;
$signame   = $private->signame;

Returns the corresponding attribute determined from the filename.

Private key attributes

$attribute = $private->attribute;

Returns the value as it appears in the private key file. The attribute names correspond to the tag in the key file, modified to form an acceptable Perl subroutine name.

COPYRIGHT

Copyright (c)2014 Dick Franks

All Rights Reserved

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

perl, Net::DNS, Net::DNS::RR::RRSIG, Net::DNS::RR::SIG