line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2015 Jerry Lundström |
2
|
|
|
|
|
|
|
# Copyright (c) 2015 .SE (The Internet Infrastructure Foundation) |
3
|
|
|
|
|
|
|
# All rights reserved. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Redistribution and use in source and binary forms, with or without |
6
|
|
|
|
|
|
|
# modification, are permitted provided that the following conditions |
7
|
|
|
|
|
|
|
# are met: |
8
|
|
|
|
|
|
|
# 1. Redistributions of source code must retain the above copyright |
9
|
|
|
|
|
|
|
# notice, this list of conditions and the following disclaimer. |
10
|
|
|
|
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright |
11
|
|
|
|
|
|
|
# notice, this list of conditions and the following disclaimer in the |
12
|
|
|
|
|
|
|
# documentation and/or other materials provided with the distribution. |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
15
|
|
|
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
16
|
|
|
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
17
|
|
|
|
|
|
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
18
|
|
|
|
|
|
|
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
19
|
|
|
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
20
|
|
|
|
|
|
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
21
|
|
|
|
|
|
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
22
|
|
|
|
|
|
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
23
|
|
|
|
|
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
24
|
|
|
|
|
|
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
package Crypt::PKCS11::Attributes; |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
2
|
|
3146
|
use common::sense; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
29
|
2
|
|
|
2
|
|
80
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
108
|
|
30
|
2
|
|
|
2
|
|
8
|
use Scalar::Util qw(blessed); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
74
|
|
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3907
|
|
33
|
2
|
|
|
2
|
|
786
|
use Crypt::PKCS11::Attribute::Value; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3397
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
our %ATTRIBUTE_MAP = ( |
36
|
|
|
|
|
|
|
CKA_CLASS() => 'Crypt::PKCS11::Attribute::Class', |
37
|
|
|
|
|
|
|
CKA_TOKEN() => 'Crypt::PKCS11::Attribute::Token', |
38
|
|
|
|
|
|
|
CKA_PRIVATE() => 'Crypt::PKCS11::Attribute::Private', |
39
|
|
|
|
|
|
|
CKA_LABEL() => 'Crypt::PKCS11::Attribute::Label', |
40
|
|
|
|
|
|
|
CKA_APPLICATION() => 'Crypt::PKCS11::Attribute::Application', |
41
|
|
|
|
|
|
|
CKA_VALUE() => 'Crypt::PKCS11::Attribute::Value', |
42
|
|
|
|
|
|
|
CKA_OBJECT_ID() => 'Crypt::PKCS11::Attribute::ObjectId', |
43
|
|
|
|
|
|
|
CKA_CERTIFICATE_TYPE() => 'Crypt::PKCS11::Attribute::CertificateType', |
44
|
|
|
|
|
|
|
CKA_ISSUER() => 'Crypt::PKCS11::Attribute::Issuer', |
45
|
|
|
|
|
|
|
CKA_SERIAL_NUMBER() => 'Crypt::PKCS11::Attribute::SerialNumber', |
46
|
|
|
|
|
|
|
CKA_AC_ISSUER() => 'Crypt::PKCS11::Attribute::AcIssuer', |
47
|
|
|
|
|
|
|
CKA_OWNER() => 'Crypt::PKCS11::Attribute::Owner', |
48
|
|
|
|
|
|
|
CKA_ATTR_TYPES() => 'Crypt::PKCS11::Attribute::AttrTypes', |
49
|
|
|
|
|
|
|
CKA_TRUSTED() => 'Crypt::PKCS11::Attribute::Trusted', |
50
|
|
|
|
|
|
|
CKA_CERTIFICATE_CATEGORY() => 'Crypt::PKCS11::Attribute::CertificateCategory', |
51
|
|
|
|
|
|
|
CKA_JAVA_MIDP_SECURITY_DOMAIN() => 'Crypt::PKCS11::Attribute::JavaMidpSecurityDomain', |
52
|
|
|
|
|
|
|
CKA_URL() => 'Crypt::PKCS11::Attribute::Url', |
53
|
|
|
|
|
|
|
CKA_HASH_OF_SUBJECT_PUBLIC_KEY() => 'Crypt::PKCS11::Attribute::HashOfSubjectPublicKey', |
54
|
|
|
|
|
|
|
CKA_HASH_OF_ISSUER_PUBLIC_KEY() => 'Crypt::PKCS11::Attribute::HashOfIssuerPublicKey', |
55
|
|
|
|
|
|
|
CKA_NAME_HASH_ALGORITHM() => 'Crypt::PKCS11::Attribute::NameHashAlgorithm', |
56
|
|
|
|
|
|
|
CKA_CHECK_VALUE() => 'Crypt::PKCS11::Attribute::CheckValue', |
57
|
|
|
|
|
|
|
CKA_KEY_TYPE() => 'Crypt::PKCS11::Attribute::KeyType', |
58
|
|
|
|
|
|
|
CKA_SUBJECT() => 'Crypt::PKCS11::Attribute::Subject', |
59
|
|
|
|
|
|
|
CKA_ID() => 'Crypt::PKCS11::Attribute::Id', |
60
|
|
|
|
|
|
|
CKA_SENSITIVE() => 'Crypt::PKCS11::Attribute::Sensitive', |
61
|
|
|
|
|
|
|
CKA_ENCRYPT() => 'Crypt::PKCS11::Attribute::Encrypt', |
62
|
|
|
|
|
|
|
CKA_DECRYPT() => 'Crypt::PKCS11::Attribute::Decrypt', |
63
|
|
|
|
|
|
|
CKA_WRAP() => 'Crypt::PKCS11::Attribute::Wrap', |
64
|
|
|
|
|
|
|
CKA_UNWRAP() => 'Crypt::PKCS11::Attribute::Unwrap', |
65
|
|
|
|
|
|
|
CKA_SIGN() => 'Crypt::PKCS11::Attribute::Sign', |
66
|
|
|
|
|
|
|
CKA_SIGN_RECOVER() => 'Crypt::PKCS11::Attribute::SignRecover', |
67
|
|
|
|
|
|
|
CKA_VERIFY() => 'Crypt::PKCS11::Attribute::Verify', |
68
|
|
|
|
|
|
|
CKA_VERIFY_RECOVER() => 'Crypt::PKCS11::Attribute::VerifyRecover', |
69
|
|
|
|
|
|
|
CKA_DERIVE() => 'Crypt::PKCS11::Attribute::Derive', |
70
|
|
|
|
|
|
|
CKA_START_DATE() => 'Crypt::PKCS11::Attribute::StartDate', |
71
|
|
|
|
|
|
|
CKA_END_DATE() => 'Crypt::PKCS11::Attribute::EndDate', |
72
|
|
|
|
|
|
|
CKA_MODULUS() => 'Crypt::PKCS11::Attribute::Modulus', |
73
|
|
|
|
|
|
|
CKA_MODULUS_BITS() => 'Crypt::PKCS11::Attribute::ModulusBits', |
74
|
|
|
|
|
|
|
CKA_PUBLIC_EXPONENT() => 'Crypt::PKCS11::Attribute::PublicExponent', |
75
|
|
|
|
|
|
|
CKA_PRIVATE_EXPONENT() => 'Crypt::PKCS11::Attribute::PrivateExponent', |
76
|
|
|
|
|
|
|
CKA_PRIME_1() => 'Crypt::PKCS11::Attribute::Prime1', |
77
|
|
|
|
|
|
|
CKA_PRIME_2() => 'Crypt::PKCS11::Attribute::Prime2', |
78
|
|
|
|
|
|
|
CKA_EXPONENT_1() => 'Crypt::PKCS11::Attribute::Exponent1', |
79
|
|
|
|
|
|
|
CKA_EXPONENT_2() => 'Crypt::PKCS11::Attribute::Exponent2', |
80
|
|
|
|
|
|
|
CKA_COEFFICIENT() => 'Crypt::PKCS11::Attribute::Coefficient', |
81
|
|
|
|
|
|
|
CKA_PRIME() => 'Crypt::PKCS11::Attribute::Prime', |
82
|
|
|
|
|
|
|
CKA_SUBPRIME() => 'Crypt::PKCS11::Attribute::Subprime', |
83
|
|
|
|
|
|
|
CKA_BASE() => 'Crypt::PKCS11::Attribute::Base', |
84
|
|
|
|
|
|
|
CKA_PRIME_BITS() => 'Crypt::PKCS11::Attribute::PrimeBits', |
85
|
|
|
|
|
|
|
CKA_SUBPRIME_BITS() => 'Crypt::PKCS11::Attribute::Subprime::Bits', |
86
|
|
|
|
|
|
|
CKA_SUB_PRIME_BITS() => 'Crypt::PKCS11::Attribute::SubPrimeBits', |
87
|
|
|
|
|
|
|
CKA_VALUE_BITS() => 'Crypt::PKCS11::Attribute::ValueBits', |
88
|
|
|
|
|
|
|
CKA_VALUE_LEN() => 'Crypt::PKCS11::Attribute::ValueLen', |
89
|
|
|
|
|
|
|
CKA_EXTRACTABLE() => 'Crypt::PKCS11::Attribute::Extractable', |
90
|
|
|
|
|
|
|
CKA_LOCAL() => 'Crypt::PKCS11::Attribute::Local', |
91
|
|
|
|
|
|
|
CKA_NEVER_EXTRACTABLE() => 'Crypt::PKCS11::Attribute::NeverExtractable', |
92
|
|
|
|
|
|
|
CKA_ALWAYS_SENSITIVE() => 'Crypt::PKCS11::Attribute::AlwaysSensitive', |
93
|
|
|
|
|
|
|
CKA_KEY_GEN_MECHANISM() => 'Crypt::PKCS11::Attribute::KeyGenMechanism', |
94
|
|
|
|
|
|
|
CKA_MODIFIABLE() => 'Crypt::PKCS11::Attribute::Modifiable', |
95
|
|
|
|
|
|
|
CKA_COPYABLE() => 'Crypt::PKCS11::Attribute::Copyable', |
96
|
|
|
|
|
|
|
CKA_ECDSA_PARAMS() => 'Crypt::PKCS11::Attribute::EcdsaParams', |
97
|
|
|
|
|
|
|
CKA_EC_PARAMS() => 'Crypt::PKCS11::Attribute::EcParams', |
98
|
|
|
|
|
|
|
CKA_EC_POINT() => 'Crypt::PKCS11::Attribute::EcPoint', |
99
|
|
|
|
|
|
|
CKA_SECONDARY_AUTH() => 'Crypt::PKCS11::Attribute::SecondaryAuth', |
100
|
|
|
|
|
|
|
CKA_AUTH_PIN_FLAGS() => 'Crypt::PKCS11::Attribute::AuthPinFlags', |
101
|
|
|
|
|
|
|
CKA_ALWAYS_AUTHENTICATE() => 'Crypt::PKCS11::Attribute::AlwaysAuthenticate', |
102
|
|
|
|
|
|
|
CKA_WRAP_WITH_TRUSTED() => 'Crypt::PKCS11::Attribute::WrapWithTrusted', |
103
|
|
|
|
|
|
|
CKA_WRAP_TEMPLATE() => 'Crypt::PKCS11::Attribute::WrapTemplate', |
104
|
|
|
|
|
|
|
CKA_UNWRAP_TEMPLATE() => 'Crypt::PKCS11::Attribute::UnwrapTemplate', |
105
|
|
|
|
|
|
|
CKA_DERIVE_TEMPLATE() => 'Crypt::PKCS11::Attribute::DeriveTemplate', |
106
|
|
|
|
|
|
|
CKA_OTP_FORMAT() => 'Crypt::PKCS11::Attribute::OtpFormat', |
107
|
|
|
|
|
|
|
CKA_OTP_LENGTH() => 'Crypt::PKCS11::Attribute::OtpLength', |
108
|
|
|
|
|
|
|
CKA_OTP_TIME_INTERVAL() => 'Crypt::PKCS11::Attribute::OtpTimeInterval', |
109
|
|
|
|
|
|
|
CKA_OTP_USER_FRIENDLY_MODE() => 'Crypt::PKCS11::Attribute::OtpUserFriendlyMode', |
110
|
|
|
|
|
|
|
CKA_OTP_CHALLENGE_REQUIREMENT() => 'Crypt::PKCS11::Attribute::OtpChallengeRequirement', |
111
|
|
|
|
|
|
|
CKA_OTP_TIME_REQUIREMENT() => 'Crypt::PKCS11::Attribute::OtpTimeRequirement', |
112
|
|
|
|
|
|
|
CKA_OTP_COUNTER_REQUIREMENT() => 'Crypt::PKCS11::Attribute::OtpCounterRequirement', |
113
|
|
|
|
|
|
|
CKA_OTP_PIN_REQUIREMENT() => 'Crypt::PKCS11::Attribute::OtpPinRequirement', |
114
|
|
|
|
|
|
|
CKA_OTP_COUNTER() => 'Crypt::PKCS11::Attribute::OtpCounter', |
115
|
|
|
|
|
|
|
CKA_OTP_TIME() => 'Crypt::PKCS11::Attribute::OtpTime', |
116
|
|
|
|
|
|
|
CKA_OTP_USER_IDENTIFIER() => 'Crypt::PKCS11::Attribute::OtpUserIdentifier', |
117
|
|
|
|
|
|
|
CKA_OTP_SERVICE_IDENTIFIER() => 'Crypt::PKCS11::Attribute::OtpServiceIdentifier', |
118
|
|
|
|
|
|
|
CKA_OTP_SERVICE_LOGO() => 'Crypt::PKCS11::Attribute::OtpServiceLogo', |
119
|
|
|
|
|
|
|
CKA_OTP_SERVICE_LOGO_TYPE() => 'Crypt::PKCS11::Attribute::OtpServiceLogoType', |
120
|
|
|
|
|
|
|
CKA_GOSTR3410_PARAMS() => 'Crypt::PKCS11::Attribute::Gostr3410Params', |
121
|
|
|
|
|
|
|
CKA_GOSTR3411_PARAMS() => 'Crypt::PKCS11::Attribute::Gostr3411Params', |
122
|
|
|
|
|
|
|
CKA_GOST28147_PARAMS() => 'Crypt::PKCS11::Attribute::Gost28147Params', |
123
|
|
|
|
|
|
|
CKA_HW_FEATURE_TYPE() => 'Crypt::PKCS11::Attribute::HwFeatureType', |
124
|
|
|
|
|
|
|
CKA_RESET_ON_INIT() => 'Crypt::PKCS11::Attribute::ResetOnInit', |
125
|
|
|
|
|
|
|
CKA_HAS_RESET() => 'Crypt::PKCS11::Attribute::HasReset', |
126
|
|
|
|
|
|
|
CKA_PIXEL_X() => 'Crypt::PKCS11::Attribute::PixelX', |
127
|
|
|
|
|
|
|
CKA_PIXEL_Y() => 'Crypt::PKCS11::Attribute::PixelY', |
128
|
|
|
|
|
|
|
CKA_RESOLUTION() => 'Crypt::PKCS11::Attribute::Resolution', |
129
|
|
|
|
|
|
|
CKA_CHAR_ROWS() => 'Crypt::PKCS11::Attribute::CharRows', |
130
|
|
|
|
|
|
|
CKA_CHAR_COLUMNS() => 'Crypt::PKCS11::Attribute::CharColumns', |
131
|
|
|
|
|
|
|
CKA_COLOR() => 'Crypt::PKCS11::Attribute::Color', |
132
|
|
|
|
|
|
|
CKA_BITS_PER_PIXEL() => 'Crypt::PKCS11::Attribute::BitsPerPixel', |
133
|
|
|
|
|
|
|
CKA_CHAR_SETS() => 'Crypt::PKCS11::Attribute::CharSets', |
134
|
|
|
|
|
|
|
CKA_ENCODING_METHODS() => 'Crypt::PKCS11::Attribute::EncodingMethods', |
135
|
|
|
|
|
|
|
CKA_MIME_TYPES() => 'Crypt::PKCS11::Attribute::MimeTypes', |
136
|
|
|
|
|
|
|
CKA_MECHANISM_TYPE() => 'Crypt::PKCS11::Attribute::MechanismType', |
137
|
|
|
|
|
|
|
CKA_REQUIRED_CMS_ATTRIBUTES() => 'Crypt::PKCS11::Attribute::RequiredCmsAttributes', |
138
|
|
|
|
|
|
|
CKA_DEFAULT_CMS_ATTRIBUTES() => 'Crypt::PKCS11::Attribute::DefaultCmsAttributes', |
139
|
|
|
|
|
|
|
CKA_SUPPORTED_CMS_ATTRIBUTES() => 'Crypt::PKCS11::Attribute::SupportedCmsAttributes', |
140
|
|
|
|
|
|
|
CKA_ALLOWED_MECHANISMS() => 'Crypt::PKCS11::Attribute::AllowedMechanisms', |
141
|
|
|
|
|
|
|
CKA_VENDOR_DEFINED() => 'Crypt::PKCS11::Attribute::VendorDefined', |
142
|
|
|
|
|
|
|
); |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
sub new { |
145
|
37
|
|
|
37
|
1
|
3770
|
my $this = CORE::shift; |
146
|
37
|
|
100
|
|
|
140
|
my $class = ref($this) || $this; |
147
|
37
|
|
|
|
|
84
|
my $self = { |
148
|
|
|
|
|
|
|
attributes => [] |
149
|
|
|
|
|
|
|
}; |
150
|
37
|
|
|
|
|
100
|
bless $self, $class; |
151
|
|
|
|
|
|
|
|
152
|
37
|
|
|
|
|
167
|
return $self; |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
sub push { |
156
|
3
|
|
|
3
|
1
|
5
|
my ($self) = CORE::shift; |
157
|
|
|
|
|
|
|
|
158
|
3
|
|
|
|
|
7
|
CORE::foreach (@_) { |
159
|
3
|
100
|
100
|
|
|
26
|
unless (blessed($_) and $_->isa('Crypt::PKCS11::Attribute')) { |
160
|
2
|
|
|
|
|
277
|
confess 'Value to push is not a Crypt::PKCS11::Attribute object'; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
} |
163
|
1
|
|
|
|
|
2
|
CORE::push(@{$self->{attributes}}, @_); |
|
1
|
|
|
|
|
6
|
|
164
|
|
|
|
|
|
|
|
165
|
1
|
|
|
|
|
5
|
return $self; |
166
|
|
|
|
|
|
|
} |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
sub pop { |
169
|
1
|
|
|
1
|
1
|
2
|
return CORE::pop(@{$_[0]->{attributes}}); |
|
1
|
|
|
|
|
5
|
|
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
sub shift { |
173
|
1
|
|
|
1
|
1
|
3
|
return CORE::shift(@{$_[0]->{attributes}}); |
|
1
|
|
|
|
|
5
|
|
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub unshift { |
177
|
3
|
|
|
3
|
1
|
6
|
my ($self) = CORE::shift; |
178
|
|
|
|
|
|
|
|
179
|
3
|
|
|
|
|
6
|
CORE::foreach (@_) { |
180
|
3
|
100
|
100
|
|
|
25
|
unless (blessed($_) and $_->isa('Crypt::PKCS11::Attribute')) { |
181
|
2
|
|
|
|
|
241
|
confess 'Value to unshift is not a Crypt::PKCS11::Attribute object'; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
} |
184
|
1
|
|
|
|
|
2
|
CORE::unshift(@{$self->{attributes}}, @_); |
|
1
|
|
|
|
|
5
|
|
185
|
|
|
|
|
|
|
|
186
|
1
|
|
|
|
|
6
|
return $self; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
sub foreach { |
190
|
2
|
|
|
2
|
1
|
408
|
my ($self, $cb) = @_; |
191
|
|
|
|
|
|
|
|
192
|
2
|
100
|
|
|
|
11
|
unless (ref($cb) eq 'CODE') { |
193
|
1
|
|
|
|
|
158
|
confess '$cb argument is not CODE'; |
194
|
|
|
|
|
|
|
} |
195
|
1
|
|
|
|
|
2
|
CORE::foreach (@{$self->{attributes}}) { |
|
1
|
|
|
|
|
4
|
|
196
|
1
|
|
|
|
|
3
|
$cb->($_); |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
|
199
|
1
|
|
|
|
|
5
|
return $self; |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
sub toArray { |
203
|
26
|
|
|
26
|
1
|
28
|
my ($self) = @_; |
204
|
26
|
|
|
|
|
29
|
my @array; |
205
|
|
|
|
|
|
|
|
206
|
26
|
|
|
|
|
22
|
CORE::foreach (@{$self->{attributes}}) { |
|
26
|
|
|
|
|
56
|
|
207
|
0
|
|
|
|
|
0
|
CORE::push(@array, { type => $_->type, pValue => $_->pValue }); |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
26
|
|
|
|
|
161
|
return \@array; |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
sub fromArray { |
214
|
10
|
|
|
10
|
1
|
3228
|
my ($self, $array) = @_; |
215
|
10
|
|
|
|
|
14
|
my @attributes; |
216
|
|
|
|
|
|
|
|
217
|
10
|
100
|
|
|
|
32
|
unless (ref($array) eq 'ARRAY') { |
218
|
2
|
|
|
|
|
383
|
confess '$array argument is not ARRAY'; |
219
|
|
|
|
|
|
|
} |
220
|
|
|
|
|
|
|
|
221
|
8
|
|
|
|
|
11
|
CORE::foreach (@{$array}) { |
|
8
|
|
|
|
|
17
|
|
222
|
8
|
100
|
100
|
|
|
81
|
unless (ref($_) eq 'HASH' |
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
223
|
|
|
|
|
|
|
and defined($_->{type}) |
224
|
|
|
|
|
|
|
and defined($_->{pValue}) |
225
|
|
|
|
|
|
|
and exists($ATTRIBUTE_MAP{$_->{type}})) |
226
|
|
|
|
|
|
|
{ |
227
|
5
|
|
|
|
|
647
|
confess 'invalid $array'; |
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
|
230
|
3
|
|
|
|
|
47
|
my $attribute = $ATTRIBUTE_MAP{$_->{type}}->new; |
231
|
3
|
|
|
|
|
24
|
$attribute->{pValue} = $_->{pValue}; |
232
|
3
|
|
|
|
|
9
|
CORE::push(@attributes, $attribute); |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
3
|
|
|
|
|
9
|
$self->{attributes} = \@attributes; |
236
|
|
|
|
|
|
|
|
237
|
3
|
|
|
|
|
9
|
return $self; |
238
|
|
|
|
|
|
|
} |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
sub all { |
241
|
2
|
|
|
2
|
1
|
4
|
return @{$_[0]->{attributes}}; |
|
2
|
|
|
|
|
14
|
|
242
|
|
|
|
|
|
|
} |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Class; |
245
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
822
|
|
246
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4126
|
|
247
|
|
|
|
|
|
|
sub type () { CKA_CLASS } |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Token; |
250
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
960
|
|
251
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3986
|
|
252
|
|
|
|
|
|
|
sub type () { CKA_TOKEN } |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Private; |
255
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
169
|
|
256
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
5082
|
|
257
|
|
|
|
|
|
|
sub type () { CKA_PRIVATE } |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Label; |
260
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1193
|
|
261
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
5632
|
|
262
|
|
|
|
|
|
|
sub type () { CKA_LABEL } |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Application; |
265
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
186
|
|
266
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
5207
|
|
267
|
|
|
|
|
|
|
sub type () { CKA_APPLICATION } |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ObjectId; |
270
|
2
|
|
|
2
|
|
18
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1201
|
|
271
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
5634
|
|
272
|
|
|
|
|
|
|
sub type () { CKA_OBJECT_ID } |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CertificateType; |
275
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
192
|
|
276
|
2
|
|
|
2
|
|
14
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
5346
|
|
277
|
|
|
|
|
|
|
sub type () { CKA_CERTIFICATE_TYPE } |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Issuer; |
280
|
2
|
|
|
2
|
|
19
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
237
|
|
281
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
5487
|
|
282
|
|
|
|
|
|
|
sub type () { CKA_ISSUER } |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SerialNumber; |
285
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
179
|
|
286
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
5301
|
|
287
|
|
|
|
|
|
|
sub type () { CKA_SERIAL_NUMBER } |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AcIssuer; |
290
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
161
|
|
291
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
5090
|
|
292
|
|
|
|
|
|
|
sub type () { CKA_AC_ISSUER } |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Owner; |
295
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
168
|
|
296
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
5013
|
|
297
|
|
|
|
|
|
|
sub type () { CKA_OWNER } |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AttrTypes; |
300
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
209
|
|
301
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4168
|
|
302
|
|
|
|
|
|
|
sub type () { CKA_ATTR_TYPES } |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Trusted; |
305
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
140
|
|
306
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3874
|
|
307
|
|
|
|
|
|
|
sub type () { CKA_TRUSTED } |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CertificateCategory; |
310
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
192
|
|
311
|
2
|
|
|
2
|
|
14
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3909
|
|
312
|
|
|
|
|
|
|
sub type () { CKA_CERTIFICATE_CATEGORY } |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::JavaMidpSecurityDomain; |
315
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
134
|
|
316
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4109
|
|
317
|
|
|
|
|
|
|
sub type () { CKA_JAVA_MIDP_SECURITY_DOMAIN } |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Url; |
320
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
140
|
|
321
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3786
|
|
322
|
|
|
|
|
|
|
sub type () { CKA_URL } |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HashOfSubjectPublicKey; |
325
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
145
|
|
326
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4037
|
|
327
|
|
|
|
|
|
|
sub type () { CKA_HASH_OF_SUBJECT_PUBLIC_KEY } |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HashOfIssuerPublicKey; |
330
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
138
|
|
331
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3990
|
|
332
|
|
|
|
|
|
|
sub type () { CKA_HASH_OF_ISSUER_PUBLIC_KEY } |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::NameHashAlgorithm; |
335
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
168
|
|
336
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4210
|
|
337
|
|
|
|
|
|
|
sub type () { CKA_NAME_HASH_ALGORITHM } |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CheckValue; |
340
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
157
|
|
341
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4111
|
|
342
|
|
|
|
|
|
|
sub type () { CKA_CHECK_VALUE } |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::KeyType; |
345
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
135
|
|
346
|
2
|
|
|
2
|
|
15
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4054
|
|
347
|
|
|
|
|
|
|
sub type () { CKA_KEY_TYPE } |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subject; |
350
|
2
|
|
|
2
|
|
18
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
191
|
|
351
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4064
|
|
352
|
|
|
|
|
|
|
sub type () { CKA_SUBJECT } |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Id; |
355
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
142
|
|
356
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3837
|
|
357
|
|
|
|
|
|
|
sub type () { CKA_ID } |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Sensitive; |
360
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
147
|
|
361
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3945
|
|
362
|
|
|
|
|
|
|
sub type () { CKA_SENSITIVE } |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Encrypt; |
365
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
143
|
|
366
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
3902
|
|
367
|
|
|
|
|
|
|
sub type () { CKA_ENCRYPT } |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Decrypt; |
370
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
146
|
|
371
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3932
|
|
372
|
|
|
|
|
|
|
sub type () { CKA_DECRYPT } |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Wrap; |
375
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
151
|
|
376
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3864
|
|
377
|
|
|
|
|
|
|
sub type () { CKA_WRAP } |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Unwrap; |
380
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
147
|
|
381
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
37
|
|
|
2
|
|
|
|
|
3938
|
|
382
|
|
|
|
|
|
|
sub type () { CKA_UNWRAP } |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Sign; |
385
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
127
|
|
386
|
2
|
|
|
2
|
|
14
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3877
|
|
387
|
|
|
|
|
|
|
sub type () { CKA_SIGN } |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SignRecover; |
390
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
173
|
|
391
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3988
|
|
392
|
|
|
|
|
|
|
sub type () { CKA_SIGN_RECOVER } |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Verify; |
395
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
144
|
|
396
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3989
|
|
397
|
|
|
|
|
|
|
sub type () { CKA_VERIFY } |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::VerifyRecover; |
400
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
152
|
|
401
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4011
|
|
402
|
|
|
|
|
|
|
sub type () { CKA_VERIFY_RECOVER } |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Derive; |
405
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
140
|
|
406
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3904
|
|
407
|
|
|
|
|
|
|
sub type () { CKA_DERIVE } |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::StartDate; |
410
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_DATE); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1079
|
|
411
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4066
|
|
412
|
|
|
|
|
|
|
sub type () { CKA_START_DATE } |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EndDate; |
415
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_DATE); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
144
|
|
416
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4027
|
|
417
|
|
|
|
|
|
|
sub type () { CKA_END_DATE } |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Modulus; |
420
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
144
|
|
421
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
3914
|
|
422
|
|
|
|
|
|
|
sub type () { CKA_MODULUS } |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ModulusBits; |
425
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
196
|
|
426
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
4138
|
|
427
|
|
|
|
|
|
|
sub type () { CKA_MODULUS_BITS } |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PublicExponent; |
430
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
145
|
|
431
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4432
|
|
432
|
|
|
|
|
|
|
sub type () { CKA_PUBLIC_EXPONENT } |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PrivateExponent; |
435
|
2
|
|
|
2
|
|
19
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
197
|
|
436
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4132
|
|
437
|
|
|
|
|
|
|
sub type () { CKA_PRIVATE_EXPONENT } |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Prime1; |
440
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
142
|
|
441
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4071
|
|
442
|
|
|
|
|
|
|
sub type () { CKA_PRIME_1 } |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Prime2; |
445
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
163
|
|
446
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4294
|
|
447
|
|
|
|
|
|
|
sub type () { CKA_PRIME_2 } |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Exponent1; |
450
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
145
|
|
451
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3980
|
|
452
|
|
|
|
|
|
|
sub type () { CKA_EXPONENT_1 } |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Exponent2; |
455
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
148
|
|
456
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4198
|
|
457
|
|
|
|
|
|
|
sub type () { CKA_EXPONENT_2 } |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Coefficient; |
460
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
148
|
|
461
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4052
|
|
462
|
|
|
|
|
|
|
sub type () { CKA_COEFFICIENT } |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Prime; |
465
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
171
|
|
466
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4177
|
|
467
|
|
|
|
|
|
|
sub type () { CKA_PRIME } |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subprime; |
470
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
175
|
|
471
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
4272
|
|
472
|
|
|
|
|
|
|
sub type () { CKA_SUBPRIME } |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Base; |
475
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
187
|
|
476
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3891
|
|
477
|
|
|
|
|
|
|
sub type () { CKA_BASE } |
478
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PrimeBits; |
480
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
139
|
|
481
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
3930
|
|
482
|
|
|
|
|
|
|
sub type () { CKA_PRIME_BITS } |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subprime::Bits; |
485
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
181
|
|
486
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3973
|
|
487
|
|
|
|
|
|
|
sub type () { CKA_SUBPRIME_BITS } |
488
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SubPrimeBits; |
490
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
142
|
|
491
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4070
|
|
492
|
|
|
|
|
|
|
sub type () { CKA_SUB_PRIME_BITS } |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ValueBits; |
495
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
153
|
|
496
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4005
|
|
497
|
|
|
|
|
|
|
sub type () { CKA_VALUE_BITS } |
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ValueLen; |
500
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
143
|
|
501
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4077
|
|
502
|
|
|
|
|
|
|
sub type () { CKA_VALUE_LEN } |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Extractable; |
505
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
186
|
|
506
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4130
|
|
507
|
|
|
|
|
|
|
sub type () { CKA_EXTRACTABLE } |
508
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Local; |
510
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
154
|
|
511
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3996
|
|
512
|
|
|
|
|
|
|
sub type () { CKA_LOCAL } |
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::NeverExtractable; |
515
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
155
|
|
516
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4006
|
|
517
|
|
|
|
|
|
|
sub type () { CKA_NEVER_EXTRACTABLE } |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AlwaysSensitive; |
520
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
154
|
|
521
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4593
|
|
522
|
|
|
|
|
|
|
sub type () { CKA_ALWAYS_SENSITIVE } |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::KeyGenMechanism; |
525
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
152
|
|
526
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4299
|
|
527
|
|
|
|
|
|
|
sub type () { CKA_KEY_GEN_MECHANISM } |
528
|
|
|
|
|
|
|
|
529
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Modifiable; |
530
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
173
|
|
531
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4208
|
|
532
|
|
|
|
|
|
|
sub type () { CKA_MODIFIABLE } |
533
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Copyable; |
535
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
142
|
|
536
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4025
|
|
537
|
|
|
|
|
|
|
sub type () { CKA_COPYABLE } |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcdsaParams; |
540
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
137
|
|
541
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4230
|
|
542
|
|
|
|
|
|
|
sub type () { CKA_ECDSA_PARAMS } |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcParams; |
545
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
148
|
|
546
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3961
|
|
547
|
|
|
|
|
|
|
sub type () { CKA_EC_PARAMS } |
548
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcPoint; |
550
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
136
|
|
551
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4003
|
|
552
|
|
|
|
|
|
|
sub type () { CKA_EC_POINT } |
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SecondaryAuth; |
555
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
140
|
|
556
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4172
|
|
557
|
|
|
|
|
|
|
sub type () { CKA_SECONDARY_AUTH } |
558
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AuthPinFlags; |
560
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
192
|
|
561
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4247
|
|
562
|
|
|
|
|
|
|
sub type () { CKA_AUTH_PIN_FLAGS } |
563
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AlwaysAuthenticate; |
565
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
152
|
|
566
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4188
|
|
567
|
|
|
|
|
|
|
sub type () { CKA_ALWAYS_AUTHENTICATE } |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::WrapWithTrusted; |
570
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
159
|
|
571
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4235
|
|
572
|
|
|
|
|
|
|
sub type () { CKA_WRAP_WITH_TRUSTED } |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::WrapTemplate; |
575
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::AttributeArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1147
|
|
576
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4691
|
|
577
|
|
|
|
|
|
|
sub type () { CKA_WRAP_TEMPLATE } |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::UnwrapTemplate; |
580
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::AttributeArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
156
|
|
581
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4851
|
|
582
|
|
|
|
|
|
|
sub type () { CKA_UNWRAP_TEMPLATE } |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::DeriveTemplate; |
585
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::AttributeArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
190
|
|
586
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4346
|
|
587
|
|
|
|
|
|
|
sub type () { CKA_DERIVE_TEMPLATE } |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpFormat; |
590
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
183
|
|
591
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4792
|
|
592
|
|
|
|
|
|
|
sub type () { CKA_OTP_FORMAT } |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpLength; |
595
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
181
|
|
596
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
5336
|
|
597
|
|
|
|
|
|
|
sub type () { CKA_OTP_LENGTH } |
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTimeInterval; |
600
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
177
|
|
601
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
5161
|
|
602
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME_INTERVAL } |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpUserFriendlyMode; |
605
|
2
|
|
|
2
|
|
23
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
189
|
|
606
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
5413
|
|
607
|
|
|
|
|
|
|
sub type () { CKA_OTP_USER_FRIENDLY_MODE } |
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpChallengeRequirement; |
610
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
204
|
|
611
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
5254
|
|
612
|
|
|
|
|
|
|
sub type () { CKA_OTP_CHALLENGE_REQUIREMENT } |
613
|
|
|
|
|
|
|
|
614
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTimeRequirement; |
615
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
190
|
|
616
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4515
|
|
617
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME_REQUIREMENT } |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpCounterRequirement; |
620
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
150
|
|
621
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4145
|
|
622
|
|
|
|
|
|
|
sub type () { CKA_OTP_COUNTER_REQUIREMENT } |
623
|
|
|
|
|
|
|
|
624
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpPinRequirement; |
625
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
166
|
|
626
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4104
|
|
627
|
|
|
|
|
|
|
sub type () { CKA_OTP_PIN_REQUIREMENT } |
628
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpCounter; |
630
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
203
|
|
631
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4260
|
|
632
|
|
|
|
|
|
|
sub type () { CKA_OTP_COUNTER } |
633
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTime; |
635
|
2
|
|
|
2
|
|
31
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
171
|
|
636
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4183
|
|
637
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME } |
638
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpUserIdentifier; |
640
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
159
|
|
641
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4131
|
|
642
|
|
|
|
|
|
|
sub type () { CKA_OTP_USER_IDENTIFIER } |
643
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpServiceIdentifier; |
645
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
153
|
|
646
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4294
|
|
647
|
|
|
|
|
|
|
sub type () { CKA_OTP_SERVICE_IDENTIFIER } |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpServiceLogo; |
650
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
152
|
|
651
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4175
|
|
652
|
|
|
|
|
|
|
sub type () { CKA_OTP_SERVICE_LOGO } |
653
|
|
|
|
|
|
|
|
654
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpServiceLogoType; |
655
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
146
|
|
656
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
4127
|
|
657
|
|
|
|
|
|
|
sub type () { CKA_OTP_SERVICE_LOGO_TYPE } |
658
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Gostr3410Params; |
660
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
145
|
|
661
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4015
|
|
662
|
|
|
|
|
|
|
sub type () { CKA_GOSTR3410_PARAMS } |
663
|
|
|
|
|
|
|
|
664
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Gostr3411Params; |
665
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
142
|
|
666
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4743
|
|
667
|
|
|
|
|
|
|
sub type () { CKA_GOSTR3411_PARAMS } |
668
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Gost28147Params; |
670
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
154
|
|
671
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
4189
|
|
672
|
|
|
|
|
|
|
sub type () { CKA_GOST28147_PARAMS } |
673
|
|
|
|
|
|
|
|
674
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HwFeatureType; |
675
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
153
|
|
676
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4056
|
|
677
|
|
|
|
|
|
|
sub type () { CKA_HW_FEATURE_TYPE } |
678
|
|
|
|
|
|
|
|
679
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ResetOnInit; |
680
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
152
|
|
681
|
2
|
|
|
2
|
|
16
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4640
|
|
682
|
|
|
|
|
|
|
sub type () { CKA_RESET_ON_INIT } |
683
|
|
|
|
|
|
|
|
684
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HasReset; |
685
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
153
|
|
686
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4312
|
|
687
|
|
|
|
|
|
|
sub type () { CKA_HAS_RESET } |
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PixelX; |
690
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
152
|
|
691
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4672
|
|
692
|
|
|
|
|
|
|
sub type () { CKA_PIXEL_X } |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PixelY; |
695
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
174
|
|
696
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4142
|
|
697
|
|
|
|
|
|
|
sub type () { CKA_PIXEL_Y } |
698
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Resolution; |
700
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
152
|
|
701
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4511
|
|
702
|
|
|
|
|
|
|
sub type () { CKA_RESOLUTION } |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CharRows; |
705
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
149
|
|
706
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4012
|
|
707
|
|
|
|
|
|
|
sub type () { CKA_CHAR_ROWS } |
708
|
|
|
|
|
|
|
|
709
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CharColumns; |
710
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
151
|
|
711
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3952
|
|
712
|
|
|
|
|
|
|
sub type () { CKA_CHAR_COLUMNS } |
713
|
|
|
|
|
|
|
|
714
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Color; |
715
|
2
|
|
|
2
|
|
18
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
142
|
|
716
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4308
|
|
717
|
|
|
|
|
|
|
sub type () { CKA_COLOR } |
718
|
|
|
|
|
|
|
|
719
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::BitsPerPixel; |
720
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
191
|
|
721
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4686
|
|
722
|
|
|
|
|
|
|
sub type () { CKA_BITS_PER_PIXEL } |
723
|
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CharSets; |
725
|
2
|
|
|
2
|
|
18
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
211
|
|
726
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4654
|
|
727
|
|
|
|
|
|
|
sub type () { CKA_CHAR_SETS } |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EncodingMethods; |
730
|
2
|
|
|
2
|
|
19
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
184
|
|
731
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
5086
|
|
732
|
|
|
|
|
|
|
sub type () { CKA_ENCODING_METHODS } |
733
|
|
|
|
|
|
|
|
734
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::MimeTypes; |
735
|
2
|
|
|
2
|
|
20
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
178
|
|
736
|
2
|
|
|
2
|
|
18
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4413
|
|
737
|
|
|
|
|
|
|
sub type () { CKA_MIME_TYPES } |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::MechanismType; |
740
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
152
|
|
741
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4215
|
|
742
|
|
|
|
|
|
|
sub type () { CKA_MECHANISM_TYPE } |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::RequiredCmsAttributes; |
745
|
2
|
|
|
2
|
|
18
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
169
|
|
746
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4123
|
|
747
|
|
|
|
|
|
|
sub type () { CKA_REQUIRED_CMS_ATTRIBUTES } |
748
|
|
|
|
|
|
|
|
749
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::DefaultCmsAttributes; |
750
|
2
|
|
|
2
|
|
17
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
181
|
|
751
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4495
|
|
752
|
|
|
|
|
|
|
sub type () { CKA_DEFAULT_CMS_ATTRIBUTES } |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SupportedCmsAttributes; |
755
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
156
|
|
756
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4417
|
|
757
|
|
|
|
|
|
|
sub type () { CKA_SUPPORTED_CMS_ATTRIBUTES } |
758
|
|
|
|
|
|
|
|
759
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AllowedMechanisms; |
760
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::UlongArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
1389
|
|
761
|
2
|
|
|
2
|
|
14
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4468
|
|
762
|
|
|
|
|
|
|
sub type () { CKA_ALLOWED_MECHANISMS } |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::VendorDefined; |
765
|
2
|
|
|
2
|
|
18
|
use base qw(Crypt::PKCS11::Attribute::CK_BYTE); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1171
|
|
766
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4563
|
|
767
|
|
|
|
|
|
|
sub type () { CKA_VENDOR_DEFINED } |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
1; |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
__END__ |