Net::DN...Private(3)
β¨ NAME β¨
okay bestie, meet Net::DNS::SEC::Private(3) β the DNSSEC Private key object β from the User Contributed Perl Documentation collection. this page is literally about that class, and yes it is iconic. π
πΈ SYNOPSIS πΈ
use Net::DNS::SEC::Private;
$private = Net::DNS::SEC::Private->new( $keypath );
$private = Net::DNS::SEC::Private->new(
'algorithm' => '13',
'keytag' => '26512',
'privatekey' => 'h/mc+iq9VDUbNAjQgi8S8JzlEX29IALchwJmNM3QYKk=',
'signame' => 'example.com.'
);
π¦ DESCRIPTION π¦
so this class is representing private keys as read from a keyfile generated by BIND dnssec-keygen. that's the whole assignment. β¨
and listen: the class is written to be used only in the context of the Net::DNS::RR::RRSIG create method. it is not designed to interact with any other system. so no cap, do not try to make it do side quests. it's giving very specific main character energy, and that's fine. π
π METHODS π
π new (from private keyfile) π
$keypath = '/home/foo/Kexample.com.+013+26512.private';
$private = Net::DNS::SEC::Private->new( $keypath );
the argument is the full path to a private key file generated by the BIND dnssec-keygen tool. and note β the filename contains information about the algorithm and keytag. the filename is lowkey doing a little extra, and we respect it. π
π§ new (from private key parameters) π§
$private = Net::DNS::SEC::Private->new(
'algorithm' => '13',
'keytag' => '26512',
'privatekey' => 'h/mc+iq9VDUbNAjQgi8S8JzlEX29IALchwJmNM3QYKk=',
'signame' => 'example.com.'
);
the arguments define the private key parameters as (name,value) pairs. the name and data representation are identical to that used in a BIND private keyfile. same vibe, same format, no weird little changes. π«Ά
π private_key_format π
$format = $private->private_key_format;
returns a string which identifies the format of the private key file. cute little format check, no drama. β¨
ποΈ algorithm, keytag, signame ποΈ
$algorithm = $private->algorithm;
$keytag = $private->keytag;
$signame = $private->signame;
returns the corresponding attribute determined from the filename. the filename really said "i contain lore" and these methods are here to retrieve it. π
π 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. so it's the same info, just dressed appropriately for Perl. periodt. π
π created, publish, activate π
$created = $private->created;
$publish = $private->publish;
$activate = $private->activate;
returns a string which represents a date in the form 20141212123456. returns an undefined value for key formats older than v1.3. so if you're on an older format and get nothing, that's literally the documented behavior, bestie β not a glitch. π
π COPYRIGHT π
Copyright (c)2014,2018 Dick Franks
All Rights Reserved
βοΈ LICENSE βοΈ
okay the legal text has entered the chat, and we are keeping it word for word because that's how licenses work. π«‘
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
π SEE ALSO π
the squad:
perlNet::DNSNet::DNS::SECNet::DNS::RR::DNSKEYNet::DNS::RR::RRSIG
mwah π β this page is from perl v5.44.0, dated 2026-10-17. Net::DN...Private(3) out. π«Άβ¨
π¦ where this page comes from
- arch rolling: perl-net-dns-sec 1.28-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms