Object/KeyCert/APNIC.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 28 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::Whois::Object::KeyCert::APNIC;
2  
3 use strict;
4 use warnings;
5 use base qw/Net::Whois::Object/;
6  
7 # whois -h whois.apnic.net -t key-cert
8 # % [whois.apnic.net]
9 # % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
10 #
11 # key-cert: [mandatory] [single] [primary/lookup key]
12 # method: [generated] [single] [ ]
13 # owner: [generated] [multiple] [ ]
14 # fingerpr: [generated] [single] [inverse key]
15 # certif: [mandatory] [multiple] [ ]
16 # org: [optional] [multiple] [inverse key]
17 # remarks: [optional] [multiple] [ ]
18 # notify: [optional] [multiple] [inverse key]
19 # admin-c: [optional] [multiple] [inverse key]
20 # tech-c: [optional] [multiple] [inverse key]
21 # mnt-by: [mandatory] [multiple] [inverse key]
22 # changed: [mandatory] [multiple] [ ]
23 # source: [mandatory] [single] [ ]
24 #
25 # % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS3)
26  
27 __PACKAGE__->attributes( 'primary', [ 'key_cert' ] );
28 __PACKAGE__->attributes( 'mandatory', [ 'key_cert', 'certif', 'mnt_by', 'changed', 'source' ] );
29 __PACKAGE__->attributes( 'optional', [ 'method', 'owner', 'fingerpr', 'org', 'remarks', 'notify', 'admin_c', 'tech_c' ] );
30 __PACKAGE__->attributes( 'single', [ 'key_cert', 'method', 'fingerpr', 'source' ] );
31 __PACKAGE__->attributes( 'multiple', [ 'owner', 'certif', 'org', 'remarks', 'notify', 'admin_c', 'tech_c', 'mnt_by', 'changed' ] );
32  
33  
34 =head1 NAME
35  
36 Net::Whois::Object::KeyCert::APNIC - an object representation of the RPSL KeyCert block
37  
38 =head1 DESCRIPTION
39  
40 A key-cert object is a database public key certificate that is stored
41 on the server and may be used with a mntner object for authentication
42 when performing updates. Currently only PGP keys are supported.
43  
44 =head1 METHODS
45  
46 =head2 B<new( %options )>
47  
48 Constructor for the Net::Whois::Object::InetRtr class
49  
50 =cut
51  
52 sub new {
53 my ( $class, @options ) = @_;
54  
55 my $self = bless {}, $class;
56 $self->_init(@options);
57  
58 return $self;
59 }
60  
61 =head2 B<key_cert( [$key_cert] )>
62  
63 Accessor to the key_cert attribute.
64 Accepts an optional key_cert value, always return the current key_cert value.
65  
66 For PGP KeyCert objects, the value of the key_cert attribute must be
67 PGP-"key-id". These keys are compliant with the Open PGP Internet Standard.
68  
69 For X.509 KeyCert objects, the database software assigns this value as
70 X.509-n. Here, 'n' is the next available number assigned by the software. If
71 you want to create an X.509 KeyCert object, you should specify the value as
72 AUTO-xx. If you delete an X.509 KeyCert object, it is not possible to
73 recreate it with the same name.
74  
75 =head2 B<method( [$method] )>
76  
77 Accessor to the method attribute.
78 Accepts an optional method, always return the current method value.
79  
80 The method attribute is generated by the software.
81 It is not necessary to include this attribute when you create or
82 modify this object. If it is supplied, the software will check the value.
83 If necessary the software will replace the supplied value with generated
84 value. In this case a warning is returned to the user.
85  
86 =head2 B<owner( [$owner] )>
87  
88 Accessor to the owner attribute.
89 Accepts an optional owner to be added to the owner array,
90 always return the current owner array.
91  
92 The owner attribute is generated by the software.
93 It is not necessary to include this attribute when you create or
94 modify this object. If it is supplied, the software will check the value.
95 If necessary the software will replace the supplied value with generated
96 value. In this case a warning is returned to the user.
97  
98 =head2 B<fingerpr( [$fingerpr] )>
99  
100 Accessor to the fingerpr attribute.
101 Accepts an optional fingerpr, always return the current fingerpr.
102  
103 The fingerpr attribute is generated by the software.
104 It is not necessary to include this attribute when you create or
105 modify this object. If it is supplied, the software will check the value.
106 If necessary the software will replace the supplied value with generated
107 value. In this case a warning is returned to the user.
108  
109 =head2 B<certif( [$certif] )>
110  
111 Accessor to the certif attribute.
112 Accepts an optional certif to be added to the certif array,
113 always return the current certif array.
114  
115 The certif attribute contains the public key. The value of the public key
116 should be supplied either using multiple certif attributes, or in one
117 certif attribute split over several lines. In the first case, this is
118 easily done by exporting the key from your local key ring in ASCII armored
119 format and adding the string certif to the start of each line of the key.
120 In the second case, line continuation should be used to represent an ASCII
121 armored format of the key. All the lines of the exported key must be included,
122 as well as the start/end markers and the empty line which separates the header
123 from the key body.
124  
125 =head2 B<remarks( [$remark] )>
126  
127 Accessor to the remarks attribute.
128 Accepts an optional remark to be added to the remarks array,
129 always return the current remarks array.
130  
131 General remarks. May include a URL or email address.
132  
133 =head2 B<org( [$org] )>
134  
135 Accessor to the org attribute.
136 Accepts an optional org value to be added to the org array,
137 always return the current org array.
138  
139 The organisation entity this object is bound to.
140  
141 =head2 B<notify( [$notify] )>
142  
143 Accessor to the notify attribute.
144 Accepts an optional notify value to be added to the notify array,
145 always return the current notify array.
146  
147 The email address to which notifications of changes to this object should be
148 sent.
149  
150 =head2 B<admin_c( [$contact] )>
151  
152 Accessor to the admin_c attribute.
153 Accepts an optional contact to be added to the admin_c array,
154 always return the current admin_c array.
155  
156 The NIC-handle of an on-site contact Person object. As more than one person
157 often fulfills a role function, there may be more than one admin_c listed.
158  
159 An administrative contact (admin_c) must be someone who is physically
160 located at the site of the network.
161  
162 =head2 B<tech_c( [$contact] )>
163  
164 Accessor to the tech_c attribute.
165 Accepts an optional contact to be added to the tech_c array,
166 always return the current tech_c array.
167  
168 The NIC-handle of a technical contact Person or Role object. As more than
169 one person often fulfills a role function, there may be more than one tech_c
170 listed.
171  
172 A technical contact (tech_c) must be a person responsible for the
173 day-to-day operation of the network, but does not need to be
174 physically located at the site of the network.
175  
176 =head2 B<mnt_by( [$mnt_by] )>
177  
178 Accessor to the mnt_by attribute.
179 Accepts an optional mnt_by value to be added to the mnt_by array,
180 always return the current mnt_by array.
181  
182 Lists a registered Mntner used to authorize and authenticate changes to this
183 object.
184  
185  
186 =head2 B<changed( [$changed] )>
187  
188 Accessor to the changed attribute.
189 Accepts an optional changed value to be added to the changed array,
190 always return the current changed array.
191  
192 The email address of who last updated the database object and the date it
193 occurred.
194  
195 Every time a change is made to a database object, this attribute will show
196 the email address of the person who made those changes.
197 Please use the address format specified in RFC 822 - Standard for
198 the Format of ARPA Internet Text Message and provide the date
199 format using one of the following two formats: YYYYMMDD or YYMMDD.
200  
201 =head2 B<source( [$source] )>
202  
203 Accessor to the source attribute.
204 Accepts an optional source, always return the current source.
205  
206 The database where the object is registered.
207  
208 =cut
209  
210 1;