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
|
|
3282
|
use common::sense; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
9
|
|
29
|
2
|
|
|
2
|
|
84
|
use Carp; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
123
|
|
30
|
2
|
|
|
2
|
|
9
|
use Scalar::Util qw(blessed); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
79
|
|
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
2
|
|
17
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4200
|
|
33
|
2
|
|
|
2
|
|
884
|
use Crypt::PKCS11::Attribute::Value; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3602
|
|
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
|
3211
|
my $this = CORE::shift; |
146
|
37
|
|
100
|
|
|
141
|
my $class = ref($this) || $this; |
147
|
37
|
|
|
|
|
93
|
my $self = { |
148
|
|
|
|
|
|
|
attributes => [] |
149
|
|
|
|
|
|
|
}; |
150
|
37
|
|
|
|
|
87
|
bless $self, $class; |
151
|
|
|
|
|
|
|
|
152
|
37
|
|
|
|
|
182
|
return $self; |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
sub push { |
156
|
3
|
|
|
3
|
1
|
4
|
my ($self) = CORE::shift; |
157
|
|
|
|
|
|
|
|
158
|
3
|
|
|
|
|
8
|
CORE::foreach (@_) { |
159
|
3
|
100
|
100
|
|
|
28
|
unless (blessed($_) and $_->isa('Crypt::PKCS11::Attribute')) { |
160
|
2
|
|
|
|
|
215
|
confess 'Value to push is not a Crypt::PKCS11::Attribute object'; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
} |
163
|
1
|
|
|
|
|
3
|
CORE::push(@{$self->{attributes}}, @_); |
|
1
|
|
|
|
|
6
|
|
164
|
|
|
|
|
|
|
|
165
|
1
|
|
|
|
|
4
|
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
|
1
|
return CORE::shift(@{$_[0]->{attributes}}); |
|
1
|
|
|
|
|
5
|
|
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub unshift { |
177
|
3
|
|
|
3
|
1
|
5
|
my ($self) = CORE::shift; |
178
|
|
|
|
|
|
|
|
179
|
3
|
|
|
|
|
6
|
CORE::foreach (@_) { |
180
|
3
|
100
|
100
|
|
|
22
|
unless (blessed($_) and $_->isa('Crypt::PKCS11::Attribute')) { |
181
|
2
|
|
|
|
|
192
|
confess 'Value to unshift is not a Crypt::PKCS11::Attribute object'; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
} |
184
|
1
|
|
|
|
|
3
|
CORE::unshift(@{$self->{attributes}}, @_); |
|
1
|
|
|
|
|
2
|
|
185
|
|
|
|
|
|
|
|
186
|
1
|
|
|
|
|
4
|
return $self; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
sub foreach { |
190
|
2
|
|
|
2
|
1
|
271
|
my ($self, $cb) = @_; |
191
|
|
|
|
|
|
|
|
192
|
2
|
100
|
|
|
|
8
|
unless (ref($cb) eq 'CODE') { |
193
|
1
|
|
|
|
|
98
|
confess '$cb argument is not CODE'; |
194
|
|
|
|
|
|
|
} |
195
|
1
|
|
|
|
|
2
|
CORE::foreach (@{$self->{attributes}}) { |
|
1
|
|
|
|
|
4
|
|
196
|
1
|
|
|
|
|
2
|
$cb->($_); |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
|
199
|
1
|
|
|
|
|
5
|
return $self; |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
sub toArray { |
203
|
26
|
|
|
26
|
1
|
31
|
my ($self) = @_; |
204
|
26
|
|
|
|
|
24
|
my @array; |
205
|
|
|
|
|
|
|
|
206
|
26
|
|
|
|
|
21
|
CORE::foreach (@{$self->{attributes}}) { |
|
26
|
|
|
|
|
48
|
|
207
|
0
|
|
|
|
|
0
|
CORE::push(@array, { type => $_->type, pValue => $_->pValue }); |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
26
|
|
|
|
|
121
|
return \@array; |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
sub fromArray { |
214
|
10
|
|
|
10
|
1
|
1917
|
my ($self, $array) = @_; |
215
|
10
|
|
|
|
|
7
|
my @attributes; |
216
|
|
|
|
|
|
|
|
217
|
10
|
100
|
|
|
|
31
|
unless (ref($array) eq 'ARRAY') { |
218
|
2
|
|
|
|
|
261
|
confess '$array argument is not ARRAY'; |
219
|
|
|
|
|
|
|
} |
220
|
|
|
|
|
|
|
|
221
|
8
|
|
|
|
|
11
|
CORE::foreach (@{$array}) { |
|
8
|
|
|
|
|
15
|
|
222
|
8
|
100
|
100
|
|
|
62
|
unless (ref($_) eq 'HASH' |
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
223
|
|
|
|
|
|
|
and defined($_->{type}) |
224
|
|
|
|
|
|
|
and defined($_->{pValue}) |
225
|
|
|
|
|
|
|
and exists($ATTRIBUTE_MAP{$_->{type}})) |
226
|
|
|
|
|
|
|
{ |
227
|
5
|
|
|
|
|
486
|
confess 'invalid $array'; |
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
|
230
|
3
|
|
|
|
|
36
|
my $attribute = $ATTRIBUTE_MAP{$_->{type}}->new; |
231
|
3
|
|
|
|
|
16
|
$attribute->{pValue} = $_->{pValue}; |
232
|
3
|
|
|
|
|
9
|
CORE::push(@attributes, $attribute); |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
3
|
|
|
|
|
8
|
$self->{attributes} = \@attributes; |
236
|
|
|
|
|
|
|
|
237
|
3
|
|
|
|
|
6
|
return $self; |
238
|
|
|
|
|
|
|
} |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
sub all { |
241
|
2
|
|
|
2
|
1
|
4
|
return @{$_[0]->{attributes}}; |
|
2
|
|
|
|
|
15
|
|
242
|
|
|
|
|
|
|
} |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Class; |
245
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
778
|
|
246
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
4472
|
|
247
|
|
|
|
|
|
|
sub type () { CKA_CLASS } |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Token; |
250
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
905
|
|
251
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4036
|
|
252
|
|
|
|
|
|
|
sub type () { CKA_TOKEN } |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Private; |
255
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
142
|
|
256
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4082
|
|
257
|
|
|
|
|
|
|
sub type () { CKA_PRIVATE } |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Label; |
260
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
946
|
|
261
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4207
|
|
262
|
|
|
|
|
|
|
sub type () { CKA_LABEL } |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Application; |
265
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
135
|
|
266
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4371
|
|
267
|
|
|
|
|
|
|
sub type () { CKA_APPLICATION } |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ObjectId; |
270
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
976
|
|
271
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4355
|
|
272
|
|
|
|
|
|
|
sub type () { CKA_OBJECT_ID } |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CertificateType; |
275
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
134
|
|
276
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4253
|
|
277
|
|
|
|
|
|
|
sub type () { CKA_CERTIFICATE_TYPE } |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Issuer; |
280
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
142
|
|
281
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4184
|
|
282
|
|
|
|
|
|
|
sub type () { CKA_ISSUER } |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SerialNumber; |
285
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
141
|
|
286
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
4333
|
|
287
|
|
|
|
|
|
|
sub type () { CKA_SERIAL_NUMBER } |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AcIssuer; |
290
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
152
|
|
291
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4030
|
|
292
|
|
|
|
|
|
|
sub type () { CKA_AC_ISSUER } |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Owner; |
295
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
143
|
|
296
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3900
|
|
297
|
|
|
|
|
|
|
sub type () { CKA_OWNER } |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AttrTypes; |
300
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
128
|
|
301
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4108
|
|
302
|
|
|
|
|
|
|
sub type () { CKA_ATTR_TYPES } |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Trusted; |
305
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
143
|
|
306
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4155
|
|
307
|
|
|
|
|
|
|
sub type () { CKA_TRUSTED } |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CertificateCategory; |
310
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
137
|
|
311
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4194
|
|
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
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
127
|
|
316
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
4186
|
|
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
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
180
|
|
321
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4175
|
|
322
|
|
|
|
|
|
|
sub type () { CKA_URL } |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HashOfSubjectPublicKey; |
325
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
175
|
|
326
|
2
|
|
|
2
|
|
47
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4264
|
|
327
|
|
|
|
|
|
|
sub type () { CKA_HASH_OF_SUBJECT_PUBLIC_KEY } |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HashOfIssuerPublicKey; |
330
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
136
|
|
331
|
2
|
|
|
2
|
|
7
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4109
|
|
332
|
|
|
|
|
|
|
sub type () { CKA_HASH_OF_ISSUER_PUBLIC_KEY } |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::NameHashAlgorithm; |
335
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
138
|
|
336
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4158
|
|
337
|
|
|
|
|
|
|
sub type () { CKA_NAME_HASH_ALGORITHM } |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CheckValue; |
340
|
2
|
|
|
2
|
|
18
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
142
|
|
341
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4026
|
|
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
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
173
|
|
346
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4169
|
|
347
|
|
|
|
|
|
|
sub type () { CKA_KEY_TYPE } |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subject; |
350
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
178
|
|
351
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3983
|
|
352
|
|
|
|
|
|
|
sub type () { CKA_SUBJECT } |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Id; |
355
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
123
|
|
356
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3858
|
|
357
|
|
|
|
|
|
|
sub type () { CKA_ID } |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Sensitive; |
360
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
132
|
|
361
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4051
|
|
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
|
|
|
|
|
129
|
|
366
|
2
|
|
|
2
|
|
7
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4047
|
|
367
|
|
|
|
|
|
|
sub type () { CKA_ENCRYPT } |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Decrypt; |
370
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
132
|
|
371
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4118
|
|
372
|
|
|
|
|
|
|
sub type () { CKA_DECRYPT } |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Wrap; |
375
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
137
|
|
376
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3929
|
|
377
|
|
|
|
|
|
|
sub type () { CKA_WRAP } |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Unwrap; |
380
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
138
|
|
381
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3992
|
|
382
|
|
|
|
|
|
|
sub type () { CKA_UNWRAP } |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Sign; |
385
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
147
|
|
386
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
4127
|
|
387
|
|
|
|
|
|
|
sub type () { CKA_SIGN } |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SignRecover; |
390
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
139
|
|
391
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4073
|
|
392
|
|
|
|
|
|
|
sub type () { CKA_SIGN_RECOVER } |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Verify; |
395
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
133
|
|
396
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4080
|
|
397
|
|
|
|
|
|
|
sub type () { CKA_VERIFY } |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::VerifyRecover; |
400
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
163
|
|
401
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4309
|
|
402
|
|
|
|
|
|
|
sub type () { CKA_VERIFY_RECOVER } |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Derive; |
405
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
151
|
|
406
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3981
|
|
407
|
|
|
|
|
|
|
sub type () { CKA_DERIVE } |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::StartDate; |
410
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_DATE); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1093
|
|
411
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4105
|
|
412
|
|
|
|
|
|
|
sub type () { CKA_START_DATE } |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EndDate; |
415
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_DATE); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
136
|
|
416
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4105
|
|
417
|
|
|
|
|
|
|
sub type () { CKA_END_DATE } |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Modulus; |
420
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
179
|
|
421
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4082
|
|
422
|
|
|
|
|
|
|
sub type () { CKA_MODULUS } |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ModulusBits; |
425
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
171
|
|
426
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4076
|
|
427
|
|
|
|
|
|
|
sub type () { CKA_MODULUS_BITS } |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PublicExponent; |
430
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
174
|
|
431
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4196
|
|
432
|
|
|
|
|
|
|
sub type () { CKA_PUBLIC_EXPONENT } |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PrivateExponent; |
435
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
159
|
|
436
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4162
|
|
437
|
|
|
|
|
|
|
sub type () { CKA_PRIVATE_EXPONENT } |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Prime1; |
440
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
145
|
|
441
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
4034
|
|
442
|
|
|
|
|
|
|
sub type () { CKA_PRIME_1 } |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Prime2; |
445
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
135
|
|
446
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4250
|
|
447
|
|
|
|
|
|
|
sub type () { CKA_PRIME_2 } |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Exponent1; |
450
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
144
|
|
451
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4233
|
|
452
|
|
|
|
|
|
|
sub type () { CKA_EXPONENT_1 } |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Exponent2; |
455
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
130
|
|
456
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
4124
|
|
457
|
|
|
|
|
|
|
sub type () { CKA_EXPONENT_2 } |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Coefficient; |
460
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
145
|
|
461
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4448
|
|
462
|
|
|
|
|
|
|
sub type () { CKA_COEFFICIENT } |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Prime; |
465
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
124
|
|
466
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4190
|
|
467
|
|
|
|
|
|
|
sub type () { CKA_PRIME } |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subprime; |
470
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
239
|
|
471
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4415
|
|
472
|
|
|
|
|
|
|
sub type () { CKA_SUBPRIME } |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Base; |
475
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
160
|
|
476
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4174
|
|
477
|
|
|
|
|
|
|
sub type () { CKA_BASE } |
478
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PrimeBits; |
480
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
182
|
|
481
|
2
|
|
|
2
|
|
15
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
3971
|
|
482
|
|
|
|
|
|
|
sub type () { CKA_PRIME_BITS } |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subprime::Bits; |
485
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
232
|
|
486
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4080
|
|
487
|
|
|
|
|
|
|
sub type () { CKA_SUBPRIME_BITS } |
488
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SubPrimeBits; |
490
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
165
|
|
491
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4249
|
|
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
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
185
|
|
496
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4382
|
|
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
|
|
|
|
|
151
|
|
501
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4337
|
|
502
|
|
|
|
|
|
|
sub type () { CKA_VALUE_LEN } |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Extractable; |
505
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
130
|
|
506
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4241
|
|
507
|
|
|
|
|
|
|
sub type () { CKA_EXTRACTABLE } |
508
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Local; |
510
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
159
|
|
511
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4287
|
|
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
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
139
|
|
516
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4182
|
|
517
|
|
|
|
|
|
|
sub type () { CKA_NEVER_EXTRACTABLE } |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AlwaysSensitive; |
520
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
175
|
|
521
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4300
|
|
522
|
|
|
|
|
|
|
sub type () { CKA_ALWAYS_SENSITIVE } |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::KeyGenMechanism; |
525
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
140
|
|
526
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4236
|
|
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
|
|
|
|
|
261
|
|
531
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4217
|
|
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
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
127
|
|
536
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4065
|
|
537
|
|
|
|
|
|
|
sub type () { CKA_COPYABLE } |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcdsaParams; |
540
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
209
|
|
541
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
4006
|
|
542
|
|
|
|
|
|
|
sub type () { CKA_ECDSA_PARAMS } |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcParams; |
545
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
125
|
|
546
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4329
|
|
547
|
|
|
|
|
|
|
sub type () { CKA_EC_PARAMS } |
548
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcPoint; |
550
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
137
|
|
551
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4138
|
|
552
|
|
|
|
|
|
|
sub type () { CKA_EC_POINT } |
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SecondaryAuth; |
555
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
202
|
|
556
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4052
|
|
557
|
|
|
|
|
|
|
sub type () { CKA_SECONDARY_AUTH } |
558
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AuthPinFlags; |
560
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
132
|
|
561
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4237
|
|
562
|
|
|
|
|
|
|
sub type () { CKA_AUTH_PIN_FLAGS } |
563
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AlwaysAuthenticate; |
565
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
151
|
|
566
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4143
|
|
567
|
|
|
|
|
|
|
sub type () { CKA_ALWAYS_AUTHENTICATE } |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::WrapWithTrusted; |
570
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
137
|
|
571
|
2
|
|
|
2
|
|
14
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4182
|
|
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
|
|
|
|
|
1114
|
|
576
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
4227
|
|
577
|
|
|
|
|
|
|
sub type () { CKA_WRAP_TEMPLATE } |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::UnwrapTemplate; |
580
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::AttributeArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
125
|
|
581
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3971
|
|
582
|
|
|
|
|
|
|
sub type () { CKA_UNWRAP_TEMPLATE } |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::DeriveTemplate; |
585
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::AttributeArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
163
|
|
586
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
4016
|
|
587
|
|
|
|
|
|
|
sub type () { CKA_DERIVE_TEMPLATE } |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpFormat; |
590
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
131
|
|
591
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3944
|
|
592
|
|
|
|
|
|
|
sub type () { CKA_OTP_FORMAT } |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpLength; |
595
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
160
|
|
596
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3958
|
|
597
|
|
|
|
|
|
|
sub type () { CKA_OTP_LENGTH } |
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTimeInterval; |
600
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
128
|
|
601
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4029
|
|
602
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME_INTERVAL } |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpUserFriendlyMode; |
605
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
151
|
|
606
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4127
|
|
607
|
|
|
|
|
|
|
sub type () { CKA_OTP_USER_FRIENDLY_MODE } |
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpChallengeRequirement; |
610
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
141
|
|
611
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3989
|
|
612
|
|
|
|
|
|
|
sub type () { CKA_OTP_CHALLENGE_REQUIREMENT } |
613
|
|
|
|
|
|
|
|
614
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTimeRequirement; |
615
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
130
|
|
616
|
2
|
|
|
2
|
|
14
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4202
|
|
617
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME_REQUIREMENT } |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpCounterRequirement; |
620
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
133
|
|
621
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4105
|
|
622
|
|
|
|
|
|
|
sub type () { CKA_OTP_COUNTER_REQUIREMENT } |
623
|
|
|
|
|
|
|
|
624
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpPinRequirement; |
625
|
2
|
|
|
2
|
|
38
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
218
|
|
626
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4142
|
|
627
|
|
|
|
|
|
|
sub type () { CKA_OTP_PIN_REQUIREMENT } |
628
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpCounter; |
630
|
2
|
|
|
2
|
|
16
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
156
|
|
631
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4311
|
|
632
|
|
|
|
|
|
|
sub type () { CKA_OTP_COUNTER } |
633
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTime; |
635
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
136
|
|
636
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3893
|
|
637
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME } |
638
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpUserIdentifier; |
640
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
149
|
|
641
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
4241
|
|
642
|
|
|
|
|
|
|
sub type () { CKA_OTP_USER_IDENTIFIER } |
643
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpServiceIdentifier; |
645
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
125
|
|
646
|
2
|
|
|
2
|
|
7
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
4258
|
|
647
|
|
|
|
|
|
|
sub type () { CKA_OTP_SERVICE_IDENTIFIER } |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpServiceLogo; |
650
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
143
|
|
651
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
4308
|
|
652
|
|
|
|
|
|
|
sub type () { CKA_OTP_SERVICE_LOGO } |
653
|
|
|
|
|
|
|
|
654
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpServiceLogoType; |
655
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
129
|
|
656
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4411
|
|
657
|
|
|
|
|
|
|
sub type () { CKA_OTP_SERVICE_LOGO_TYPE } |
658
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Gostr3410Params; |
660
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
168
|
|
661
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4438
|
|
662
|
|
|
|
|
|
|
sub type () { CKA_GOSTR3410_PARAMS } |
663
|
|
|
|
|
|
|
|
664
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Gostr3411Params; |
665
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
140
|
|
666
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4047
|
|
667
|
|
|
|
|
|
|
sub type () { CKA_GOSTR3411_PARAMS } |
668
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Gost28147Params; |
670
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
124
|
|
671
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4121
|
|
672
|
|
|
|
|
|
|
sub type () { CKA_GOST28147_PARAMS } |
673
|
|
|
|
|
|
|
|
674
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HwFeatureType; |
675
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
147
|
|
676
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4056
|
|
677
|
|
|
|
|
|
|
sub type () { CKA_HW_FEATURE_TYPE } |
678
|
|
|
|
|
|
|
|
679
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ResetOnInit; |
680
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
137
|
|
681
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4073
|
|
682
|
|
|
|
|
|
|
sub type () { CKA_RESET_ON_INIT } |
683
|
|
|
|
|
|
|
|
684
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HasReset; |
685
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
129
|
|
686
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4149
|
|
687
|
|
|
|
|
|
|
sub type () { CKA_HAS_RESET } |
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PixelX; |
690
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
133
|
|
691
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4046
|
|
692
|
|
|
|
|
|
|
sub type () { CKA_PIXEL_X } |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PixelY; |
695
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
141
|
|
696
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4494
|
|
697
|
|
|
|
|
|
|
sub type () { CKA_PIXEL_Y } |
698
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Resolution; |
700
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
178
|
|
701
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4164
|
|
702
|
|
|
|
|
|
|
sub type () { CKA_RESOLUTION } |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CharRows; |
705
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
148
|
|
706
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3918
|
|
707
|
|
|
|
|
|
|
sub type () { CKA_CHAR_ROWS } |
708
|
|
|
|
|
|
|
|
709
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CharColumns; |
710
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
128
|
|
711
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4166
|
|
712
|
|
|
|
|
|
|
sub type () { CKA_CHAR_COLUMNS } |
713
|
|
|
|
|
|
|
|
714
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Color; |
715
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
163
|
|
716
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4111
|
|
717
|
|
|
|
|
|
|
sub type () { CKA_COLOR } |
718
|
|
|
|
|
|
|
|
719
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::BitsPerPixel; |
720
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
128
|
|
721
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
4234
|
|
722
|
|
|
|
|
|
|
sub type () { CKA_BITS_PER_PIXEL } |
723
|
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CharSets; |
725
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
149
|
|
726
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3878
|
|
727
|
|
|
|
|
|
|
sub type () { CKA_CHAR_SETS } |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EncodingMethods; |
730
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
131
|
|
731
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4024
|
|
732
|
|
|
|
|
|
|
sub type () { CKA_ENCODING_METHODS } |
733
|
|
|
|
|
|
|
|
734
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::MimeTypes; |
735
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
129
|
|
736
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4146
|
|
737
|
|
|
|
|
|
|
sub type () { CKA_MIME_TYPES } |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::MechanismType; |
740
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
135
|
|
741
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4211
|
|
742
|
|
|
|
|
|
|
sub type () { CKA_MECHANISM_TYPE } |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::RequiredCmsAttributes; |
745
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
143
|
|
746
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4124
|
|
747
|
|
|
|
|
|
|
sub type () { CKA_REQUIRED_CMS_ATTRIBUTES } |
748
|
|
|
|
|
|
|
|
749
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::DefaultCmsAttributes; |
750
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
153
|
|
751
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4178
|
|
752
|
|
|
|
|
|
|
sub type () { CKA_DEFAULT_CMS_ATTRIBUTES } |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SupportedCmsAttributes; |
755
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
129
|
|
756
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4553
|
|
757
|
|
|
|
|
|
|
sub type () { CKA_SUPPORTED_CMS_ATTRIBUTES } |
758
|
|
|
|
|
|
|
|
759
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AllowedMechanisms; |
760
|
2
|
|
|
2
|
|
74
|
use base qw(Crypt::PKCS11::Attribute::UlongArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1352
|
|
761
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4306
|
|
762
|
|
|
|
|
|
|
sub type () { CKA_ALLOWED_MECHANISMS } |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::VendorDefined; |
765
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BYTE); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
919
|
|
766
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4196
|
|
767
|
|
|
|
|
|
|
sub type () { CKA_VENDOR_DEFINED } |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
1; |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
__END__ |