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
|
|
2907
|
use common::sense; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
29
|
2
|
|
|
2
|
|
79
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
98
|
|
30
|
2
|
|
|
2
|
|
8
|
use Scalar::Util qw(blessed); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
118
|
|
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3608
|
|
33
|
2
|
|
|
2
|
|
782
|
use Crypt::PKCS11::Attribute::Value; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3520
|
|
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
|
3509
|
my $this = CORE::shift; |
146
|
37
|
|
100
|
|
|
143
|
my $class = ref($this) || $this; |
147
|
37
|
|
|
|
|
79
|
my $self = { |
148
|
|
|
|
|
|
|
attributes => [] |
149
|
|
|
|
|
|
|
}; |
150
|
37
|
|
|
|
|
81
|
bless $self, $class; |
151
|
|
|
|
|
|
|
|
152
|
37
|
|
|
|
|
151
|
return $self; |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
sub push { |
156
|
3
|
|
|
3
|
1
|
5
|
my ($self) = CORE::shift; |
157
|
|
|
|
|
|
|
|
158
|
3
|
|
|
|
|
12
|
CORE::foreach (@_) { |
159
|
3
|
100
|
100
|
|
|
23
|
unless (blessed($_) and $_->isa('Crypt::PKCS11::Attribute')) { |
160
|
2
|
|
|
|
|
205
|
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
|
|
|
|
|
5
|
return $self; |
166
|
|
|
|
|
|
|
} |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
sub pop { |
169
|
1
|
|
|
1
|
1
|
3
|
return CORE::pop(@{$_[0]->{attributes}}); |
|
1
|
|
|
|
|
6
|
|
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
sub shift { |
173
|
1
|
|
|
1
|
1
|
2
|
return CORE::shift(@{$_[0]->{attributes}}); |
|
1
|
|
|
|
|
17
|
|
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub unshift { |
177
|
3
|
|
|
3
|
1
|
6
|
my ($self) = CORE::shift; |
178
|
|
|
|
|
|
|
|
179
|
3
|
|
|
|
|
6
|
CORE::foreach (@_) { |
180
|
3
|
100
|
100
|
|
|
22
|
unless (blessed($_) and $_->isa('Crypt::PKCS11::Attribute')) { |
181
|
2
|
|
|
|
|
205
|
confess 'Value to unshift is not a Crypt::PKCS11::Attribute object'; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
} |
184
|
1
|
|
|
|
|
3
|
CORE::unshift(@{$self->{attributes}}, @_); |
|
1
|
|
|
|
|
3
|
|
185
|
|
|
|
|
|
|
|
186
|
1
|
|
|
|
|
4
|
return $self; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
sub foreach { |
190
|
2
|
|
|
2
|
1
|
392
|
my ($self, $cb) = @_; |
191
|
|
|
|
|
|
|
|
192
|
2
|
100
|
|
|
|
7
|
unless (ref($cb) eq 'CODE') { |
193
|
1
|
|
|
|
|
107
|
confess '$cb argument is not CODE'; |
194
|
|
|
|
|
|
|
} |
195
|
1
|
|
|
|
|
2
|
CORE::foreach (@{$self->{attributes}}) { |
|
1
|
|
|
|
|
4
|
|
196
|
1
|
|
|
|
|
3
|
$cb->($_); |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
|
199
|
1
|
|
|
|
|
6
|
return $self; |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
sub toArray { |
203
|
26
|
|
|
26
|
1
|
30
|
my ($self) = @_; |
204
|
26
|
|
|
|
|
23
|
my @array; |
205
|
|
|
|
|
|
|
|
206
|
26
|
|
|
|
|
27
|
CORE::foreach (@{$self->{attributes}}) { |
|
26
|
|
|
|
|
60
|
|
207
|
0
|
|
|
|
|
0
|
CORE::push(@array, { type => $_->type, pValue => $_->pValue }); |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
26
|
|
|
|
|
131
|
return \@array; |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
sub fromArray { |
214
|
10
|
|
|
10
|
1
|
2510
|
my ($self, $array) = @_; |
215
|
10
|
|
|
|
|
12
|
my @attributes; |
216
|
|
|
|
|
|
|
|
217
|
10
|
100
|
|
|
|
29
|
unless (ref($array) eq 'ARRAY') { |
218
|
2
|
|
|
|
|
290
|
confess '$array argument is not ARRAY'; |
219
|
|
|
|
|
|
|
} |
220
|
|
|
|
|
|
|
|
221
|
8
|
|
|
|
|
10
|
CORE::foreach (@{$array}) { |
|
8
|
|
|
|
|
13
|
|
222
|
8
|
100
|
100
|
|
|
68
|
unless (ref($_) eq 'HASH' |
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
223
|
|
|
|
|
|
|
and defined($_->{type}) |
224
|
|
|
|
|
|
|
and defined($_->{pValue}) |
225
|
|
|
|
|
|
|
and exists($ATTRIBUTE_MAP{$_->{type}})) |
226
|
|
|
|
|
|
|
{ |
227
|
5
|
|
|
|
|
508
|
confess 'invalid $array'; |
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
|
230
|
3
|
|
|
|
|
37
|
my $attribute = $ATTRIBUTE_MAP{$_->{type}}->new; |
231
|
3
|
|
|
|
|
18
|
$attribute->{pValue} = $_->{pValue}; |
232
|
3
|
|
|
|
|
9
|
CORE::push(@attributes, $attribute); |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
3
|
|
|
|
|
6
|
$self->{attributes} = \@attributes; |
236
|
|
|
|
|
|
|
|
237
|
3
|
|
|
|
|
7
|
return $self; |
238
|
|
|
|
|
|
|
} |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
sub all { |
241
|
2
|
|
|
2
|
1
|
4
|
return @{$_[0]->{attributes}}; |
|
2
|
|
|
|
|
13
|
|
242
|
|
|
|
|
|
|
} |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Class; |
245
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
752
|
|
246
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3889
|
|
247
|
|
|
|
|
|
|
sub type () { CKA_CLASS } |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Token; |
250
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
791
|
|
251
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3874
|
|
252
|
|
|
|
|
|
|
sub type () { CKA_TOKEN } |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Private; |
255
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
137
|
|
256
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3984
|
|
257
|
|
|
|
|
|
|
sub type () { CKA_PRIVATE } |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Label; |
260
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
802
|
|
261
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3904
|
|
262
|
|
|
|
|
|
|
sub type () { CKA_LABEL } |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Application; |
265
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
127
|
|
266
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4038
|
|
267
|
|
|
|
|
|
|
sub type () { CKA_APPLICATION } |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ObjectId; |
270
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
806
|
|
271
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4042
|
|
272
|
|
|
|
|
|
|
sub type () { CKA_OBJECT_ID } |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CertificateType; |
275
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
200
|
|
276
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3955
|
|
277
|
|
|
|
|
|
|
sub type () { CKA_CERTIFICATE_TYPE } |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Issuer; |
280
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
501
|
|
281
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
4244
|
|
282
|
|
|
|
|
|
|
sub type () { CKA_ISSUER } |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SerialNumber; |
285
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
147
|
|
286
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4015
|
|
287
|
|
|
|
|
|
|
sub type () { CKA_SERIAL_NUMBER } |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AcIssuer; |
290
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
132
|
|
291
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4156
|
|
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
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
145
|
|
296
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3923
|
|
297
|
|
|
|
|
|
|
sub type () { CKA_OWNER } |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AttrTypes; |
300
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
151
|
|
301
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3958
|
|
302
|
|
|
|
|
|
|
sub type () { CKA_ATTR_TYPES } |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Trusted; |
305
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
135
|
|
306
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3914
|
|
307
|
|
|
|
|
|
|
sub type () { CKA_TRUSTED } |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CertificateCategory; |
310
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
141
|
|
311
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4076
|
|
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
|
|
|
|
|
132
|
|
316
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4075
|
|
317
|
|
|
|
|
|
|
sub type () { CKA_JAVA_MIDP_SECURITY_DOMAIN } |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Url; |
320
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
137
|
|
321
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3878
|
|
322
|
|
|
|
|
|
|
sub type () { CKA_URL } |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HashOfSubjectPublicKey; |
325
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
145
|
|
326
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
4379
|
|
327
|
|
|
|
|
|
|
sub type () { CKA_HASH_OF_SUBJECT_PUBLIC_KEY } |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HashOfIssuerPublicKey; |
330
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
172
|
|
331
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
5069
|
|
332
|
|
|
|
|
|
|
sub type () { CKA_HASH_OF_ISSUER_PUBLIC_KEY } |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::NameHashAlgorithm; |
335
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
145
|
|
336
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3934
|
|
337
|
|
|
|
|
|
|
sub type () { CKA_NAME_HASH_ALGORITHM } |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CheckValue; |
340
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
139
|
|
341
|
2
|
|
|
2
|
|
14
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4123
|
|
342
|
|
|
|
|
|
|
sub type () { CKA_CHECK_VALUE } |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::KeyType; |
345
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
129
|
|
346
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3882
|
|
347
|
|
|
|
|
|
|
sub type () { CKA_KEY_TYPE } |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subject; |
350
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
141
|
|
351
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4103
|
|
352
|
|
|
|
|
|
|
sub type () { CKA_SUBJECT } |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Id; |
355
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
134
|
|
356
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3784
|
|
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
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
132
|
|
361
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3954
|
|
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
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
137
|
|
366
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3902
|
|
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
|
|
|
|
|
151
|
|
371
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4224
|
|
372
|
|
|
|
|
|
|
sub type () { CKA_DECRYPT } |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Wrap; |
375
|
2
|
|
|
2
|
|
15
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
145
|
|
376
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3862
|
|
377
|
|
|
|
|
|
|
sub type () { CKA_WRAP } |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Unwrap; |
380
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
137
|
|
381
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3952
|
|
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
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
127
|
|
386
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
3870
|
|
387
|
|
|
|
|
|
|
sub type () { CKA_SIGN } |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SignRecover; |
390
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
189
|
|
391
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4061
|
|
392
|
|
|
|
|
|
|
sub type () { CKA_SIGN_RECOVER } |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Verify; |
395
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
135
|
|
396
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3964
|
|
397
|
|
|
|
|
|
|
sub type () { CKA_VERIFY } |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::VerifyRecover; |
400
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
136
|
|
401
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4017
|
|
402
|
|
|
|
|
|
|
sub type () { CKA_VERIFY_RECOVER } |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Derive; |
405
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
137
|
|
406
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3901
|
|
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
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
1069
|
|
411
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3954
|
|
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
|
|
|
|
|
135
|
|
416
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4109
|
|
417
|
|
|
|
|
|
|
sub type () { CKA_END_DATE } |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Modulus; |
420
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
141
|
|
421
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3895
|
|
422
|
|
|
|
|
|
|
sub type () { CKA_MODULUS } |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ModulusBits; |
425
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
135
|
|
426
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4025
|
|
427
|
|
|
|
|
|
|
sub type () { CKA_MODULUS_BITS } |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PublicExponent; |
430
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
134
|
|
431
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3979
|
|
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
|
|
|
|
|
135
|
|
436
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4061
|
|
437
|
|
|
|
|
|
|
sub type () { CKA_PRIVATE_EXPONENT } |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Prime1; |
440
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
191
|
|
441
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4132
|
|
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
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
148
|
|
446
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3894
|
|
447
|
|
|
|
|
|
|
sub type () { CKA_PRIME_2 } |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Exponent1; |
450
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
133
|
|
451
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3897
|
|
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
|
|
|
|
|
134
|
|
456
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4007
|
|
457
|
|
|
|
|
|
|
sub type () { CKA_EXPONENT_2 } |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Coefficient; |
460
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
131
|
|
461
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4171
|
|
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
|
|
|
|
|
130
|
|
466
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4025
|
|
467
|
|
|
|
|
|
|
sub type () { CKA_PRIME } |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subprime; |
470
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
131
|
|
471
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3942
|
|
472
|
|
|
|
|
|
|
sub type () { CKA_SUBPRIME } |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Base; |
475
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
130
|
|
476
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3951
|
|
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
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
306
|
|
481
|
2
|
|
|
2
|
|
19
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3922
|
|
482
|
|
|
|
|
|
|
sub type () { CKA_PRIME_BITS } |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Subprime::Bits; |
485
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
138
|
|
486
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4072
|
|
487
|
|
|
|
|
|
|
sub type () { CKA_SUBPRIME_BITS } |
488
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SubPrimeBits; |
490
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
135
|
|
491
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3976
|
|
492
|
|
|
|
|
|
|
sub type () { CKA_SUB_PRIME_BITS } |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ValueBits; |
495
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
139
|
|
496
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3917
|
|
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
|
|
|
|
|
135
|
|
501
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3945
|
|
502
|
|
|
|
|
|
|
sub type () { CKA_VALUE_LEN } |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Extractable; |
505
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
135
|
|
506
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3976
|
|
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
|
|
|
|
|
140
|
|
511
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4025
|
|
512
|
|
|
|
|
|
|
sub type () { CKA_LOCAL } |
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::NeverExtractable; |
515
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
146
|
|
516
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
3977
|
|
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
|
|
|
|
|
137
|
|
521
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3992
|
|
522
|
|
|
|
|
|
|
sub type () { CKA_ALWAYS_SENSITIVE } |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::KeyGenMechanism; |
525
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
137
|
|
526
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3975
|
|
527
|
|
|
|
|
|
|
sub type () { CKA_KEY_GEN_MECHANISM } |
528
|
|
|
|
|
|
|
|
529
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Modifiable; |
530
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
155
|
|
531
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3967
|
|
532
|
|
|
|
|
|
|
sub type () { CKA_MODIFIABLE } |
533
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Copyable; |
535
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
171
|
|
536
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3890
|
|
537
|
|
|
|
|
|
|
sub type () { CKA_COPYABLE } |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcdsaParams; |
540
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
136
|
|
541
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4025
|
|
542
|
|
|
|
|
|
|
sub type () { CKA_ECDSA_PARAMS } |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcParams; |
545
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
146
|
|
546
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3945
|
|
547
|
|
|
|
|
|
|
sub type () { CKA_EC_PARAMS } |
548
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EcPoint; |
550
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
138
|
|
551
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4018
|
|
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
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
137
|
|
556
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4173
|
|
557
|
|
|
|
|
|
|
sub type () { CKA_SECONDARY_AUTH } |
558
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AuthPinFlags; |
560
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
142
|
|
561
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4105
|
|
562
|
|
|
|
|
|
|
sub type () { CKA_AUTH_PIN_FLAGS } |
563
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AlwaysAuthenticate; |
565
|
2
|
|
|
2
|
|
14
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
140
|
|
566
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4029
|
|
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
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
148
|
|
571
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4079
|
|
572
|
|
|
|
|
|
|
sub type () { CKA_WRAP_WITH_TRUSTED } |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::WrapTemplate; |
575
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::AttributeArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
1128
|
|
576
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4150
|
|
577
|
|
|
|
|
|
|
sub type () { CKA_WRAP_TEMPLATE } |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::UnwrapTemplate; |
580
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::AttributeArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
138
|
|
581
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3959
|
|
582
|
|
|
|
|
|
|
sub type () { CKA_UNWRAP_TEMPLATE } |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::DeriveTemplate; |
585
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::AttributeArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
137
|
|
586
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4072
|
|
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
|
|
|
|
|
136
|
|
591
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4036
|
|
592
|
|
|
|
|
|
|
sub type () { CKA_OTP_FORMAT } |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpLength; |
595
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
145
|
|
596
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4054
|
|
597
|
|
|
|
|
|
|
sub type () { CKA_OTP_LENGTH } |
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTimeInterval; |
600
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
145
|
|
601
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4057
|
|
602
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME_INTERVAL } |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpUserFriendlyMode; |
605
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
142
|
|
606
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
4126
|
|
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
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
136
|
|
611
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4108
|
|
612
|
|
|
|
|
|
|
sub type () { CKA_OTP_CHALLENGE_REQUIREMENT } |
613
|
|
|
|
|
|
|
|
614
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTimeRequirement; |
615
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
136
|
|
616
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4025
|
|
617
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME_REQUIREMENT } |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpCounterRequirement; |
620
|
2
|
|
|
2
|
|
10
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
136
|
|
621
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4064
|
|
622
|
|
|
|
|
|
|
sub type () { CKA_OTP_COUNTER_REQUIREMENT } |
623
|
|
|
|
|
|
|
|
624
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpPinRequirement; |
625
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
152
|
|
626
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4001
|
|
627
|
|
|
|
|
|
|
sub type () { CKA_OTP_PIN_REQUIREMENT } |
628
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpCounter; |
630
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
146
|
|
631
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4122
|
|
632
|
|
|
|
|
|
|
sub type () { CKA_OTP_COUNTER } |
633
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpTime; |
635
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
175
|
|
636
|
2
|
|
|
2
|
|
8
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3998
|
|
637
|
|
|
|
|
|
|
sub type () { CKA_OTP_TIME } |
638
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpUserIdentifier; |
640
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
144
|
|
641
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4065
|
|
642
|
|
|
|
|
|
|
sub type () { CKA_OTP_USER_IDENTIFIER } |
643
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpServiceIdentifier; |
645
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
134
|
|
646
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4039
|
|
647
|
|
|
|
|
|
|
sub type () { CKA_OTP_SERVICE_IDENTIFIER } |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::OtpServiceLogo; |
650
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
139
|
|
651
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4010
|
|
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
|
|
|
|
|
142
|
|
656
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4063
|
|
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
|
|
|
|
|
140
|
|
661
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4103
|
|
662
|
|
|
|
|
|
|
sub type () { CKA_GOSTR3410_PARAMS } |
663
|
|
|
|
|
|
|
|
664
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Gostr3411Params; |
665
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
140
|
|
666
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4577
|
|
667
|
|
|
|
|
|
|
sub type () { CKA_GOSTR3411_PARAMS } |
668
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Gost28147Params; |
670
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
145
|
|
671
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
4106
|
|
672
|
|
|
|
|
|
|
sub type () { CKA_GOST28147_PARAMS } |
673
|
|
|
|
|
|
|
|
674
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HwFeatureType; |
675
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
156
|
|
676
|
2
|
|
|
2
|
|
13
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4121
|
|
677
|
|
|
|
|
|
|
sub type () { CKA_HW_FEATURE_TYPE } |
678
|
|
|
|
|
|
|
|
679
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::ResetOnInit; |
680
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
141
|
|
681
|
2
|
|
|
2
|
|
18
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4226
|
|
682
|
|
|
|
|
|
|
sub type () { CKA_RESET_ON_INIT } |
683
|
|
|
|
|
|
|
|
684
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::HasReset; |
685
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_BBOOL); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
139
|
|
686
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4262
|
|
687
|
|
|
|
|
|
|
sub type () { CKA_HAS_RESET } |
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PixelX; |
690
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
142
|
|
691
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3950
|
|
692
|
|
|
|
|
|
|
sub type () { CKA_PIXEL_X } |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::PixelY; |
695
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
134
|
|
696
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3942
|
|
697
|
|
|
|
|
|
|
sub type () { CKA_PIXEL_Y } |
698
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Resolution; |
700
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
152
|
|
701
|
2
|
|
|
2
|
|
16
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3966
|
|
702
|
|
|
|
|
|
|
sub type () { CKA_RESOLUTION } |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CharRows; |
705
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
146
|
|
706
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4053
|
|
707
|
|
|
|
|
|
|
sub type () { CKA_CHAR_ROWS } |
708
|
|
|
|
|
|
|
|
709
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::CharColumns; |
710
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
140
|
|
711
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
3967
|
|
712
|
|
|
|
|
|
|
sub type () { CKA_CHAR_COLUMNS } |
713
|
|
|
|
|
|
|
|
714
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::Color; |
715
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
131
|
|
716
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3973
|
|
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
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
134
|
|
721
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4030
|
|
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
|
|
|
|
|
147
|
|
726
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3997
|
|
727
|
|
|
|
|
|
|
sub type () { CKA_CHAR_SETS } |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::EncodingMethods; |
730
|
2
|
|
|
2
|
|
51
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
140
|
|
731
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4062
|
|
732
|
|
|
|
|
|
|
sub type () { CKA_ENCODING_METHODS } |
733
|
|
|
|
|
|
|
|
734
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::MimeTypes; |
735
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::RFC2279string); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
140
|
|
736
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4114
|
|
737
|
|
|
|
|
|
|
sub type () { CKA_MIME_TYPES } |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::MechanismType; |
740
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::CK_ULONG); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
137
|
|
741
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3996
|
|
742
|
|
|
|
|
|
|
sub type () { CKA_MECHANISM_TYPE } |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::RequiredCmsAttributes; |
745
|
2
|
|
|
2
|
|
11
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
139
|
|
746
|
2
|
|
|
2
|
|
10
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4100
|
|
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
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
151
|
|
751
|
2
|
|
|
2
|
|
9
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
4123
|
|
752
|
|
|
|
|
|
|
sub type () { CKA_DEFAULT_CMS_ATTRIBUTES } |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::SupportedCmsAttributes; |
755
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::ByteArray); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
135
|
|
756
|
2
|
|
|
2
|
|
17
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
4200
|
|
757
|
|
|
|
|
|
|
sub type () { CKA_SUPPORTED_CMS_ATTRIBUTES } |
758
|
|
|
|
|
|
|
|
759
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::AllowedMechanisms; |
760
|
2
|
|
|
2
|
|
12
|
use base qw(Crypt::PKCS11::Attribute::UlongArray); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1021
|
|
761
|
2
|
|
|
2
|
|
11
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
4041
|
|
762
|
|
|
|
|
|
|
sub type () { CKA_ALLOWED_MECHANISMS } |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
package Crypt::PKCS11::Attribute::VendorDefined; |
765
|
2
|
|
|
2
|
|
13
|
use base qw(Crypt::PKCS11::Attribute::CK_BYTE); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
962
|
|
766
|
2
|
|
|
2
|
|
12
|
use Crypt::PKCS11 qw(:constant); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4184
|
|
767
|
|
|
|
|
|
|
sub type () { CKA_VENDOR_DEFINED } |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
1; |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
__END__ |