origami-docspring 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/examples/attachments/attachment.rb +7 -8
- data/examples/attachments/nested_document.rb +6 -5
- data/examples/encryption/encryption.rb +5 -4
- data/examples/events/events.rb +7 -6
- data/examples/flash/flash.rb +10 -9
- data/examples/forms/javascript.rb +14 -13
- data/examples/forms/xfa.rb +67 -66
- data/examples/javascript/hello_world.rb +6 -5
- data/examples/javascript/js_emulation.rb +26 -26
- data/examples/loop/goto.rb +12 -11
- data/examples/loop/named.rb +17 -16
- data/examples/signature/signature.rb +11 -11
- data/examples/uri/javascript.rb +25 -24
- data/examples/uri/open-uri.rb +5 -4
- data/examples/uri/submitform.rb +11 -10
- data/lib/origami/3d.rb +330 -334
- data/lib/origami/acroform.rb +267 -268
- data/lib/origami/actions.rb +266 -278
- data/lib/origami/annotations.rb +659 -670
- data/lib/origami/array.rb +192 -196
- data/lib/origami/boolean.rb +66 -70
- data/lib/origami/catalog.rb +360 -363
- data/lib/origami/collections.rb +132 -133
- data/lib/origami/compound.rb +125 -129
- data/lib/origami/destinations.rb +226 -237
- data/lib/origami/dictionary.rb +155 -154
- data/lib/origami/encryption.rb +967 -923
- data/lib/origami/extensions/fdf.rb +270 -275
- data/lib/origami/extensions/ppklite.rb +323 -328
- data/lib/origami/filespec.rb +170 -173
- data/lib/origami/filters/ascii.rb +162 -167
- data/lib/origami/filters/ccitt/tables.rb +248 -252
- data/lib/origami/filters/ccitt.rb +309 -312
- data/lib/origami/filters/crypt.rb +31 -34
- data/lib/origami/filters/dct.rb +47 -50
- data/lib/origami/filters/flate.rb +57 -60
- data/lib/origami/filters/jbig2.rb +50 -53
- data/lib/origami/filters/jpx.rb +40 -43
- data/lib/origami/filters/lzw.rb +151 -155
- data/lib/origami/filters/predictors.rb +250 -255
- data/lib/origami/filters/runlength.rb +111 -115
- data/lib/origami/filters.rb +319 -325
- data/lib/origami/font.rb +173 -177
- data/lib/origami/functions.rb +62 -66
- data/lib/origami/graphics/colors.rb +203 -208
- data/lib/origami/graphics/instruction.rb +79 -81
- data/lib/origami/graphics/path.rb +141 -144
- data/lib/origami/graphics/patterns.rb +156 -160
- data/lib/origami/graphics/render.rb +51 -47
- data/lib/origami/graphics/state.rb +144 -142
- data/lib/origami/graphics/text.rb +185 -188
- data/lib/origami/graphics/xobject.rb +818 -804
- data/lib/origami/graphics.rb +25 -26
- data/lib/origami/header.rb +63 -65
- data/lib/origami/javascript.rb +718 -651
- data/lib/origami/linearization.rb +284 -285
- data/lib/origami/metadata.rb +156 -135
- data/lib/origami/name.rb +98 -100
- data/lib/origami/null.rb +49 -51
- data/lib/origami/numeric.rb +133 -135
- data/lib/origami/obfuscation.rb +180 -182
- data/lib/origami/object.rb +634 -631
- data/lib/origami/optionalcontent.rb +147 -149
- data/lib/origami/outline.rb +46 -48
- data/lib/origami/outputintents.rb +76 -77
- data/lib/origami/page.rb +637 -596
- data/lib/origami/parser.rb +214 -221
- data/lib/origami/parsers/fdf.rb +44 -45
- data/lib/origami/parsers/pdf/lazy.rb +147 -154
- data/lib/origami/parsers/pdf/linear.rb +104 -109
- data/lib/origami/parsers/pdf.rb +109 -107
- data/lib/origami/parsers/ppklite.rb +44 -46
- data/lib/origami/pdf.rb +886 -896
- data/lib/origami/reference.rb +116 -120
- data/lib/origami/signature.rb +617 -625
- data/lib/origami/stream.rb +560 -558
- data/lib/origami/string.rb +366 -368
- data/lib/origami/template/patterns.rb +50 -52
- data/lib/origami/template/widgets.rb +111 -114
- data/lib/origami/trailer.rb +153 -157
- data/lib/origami/tree.rb +55 -57
- data/lib/origami/version.rb +19 -19
- data/lib/origami/webcapture.rb +87 -90
- data/lib/origami/xfa/config.rb +409 -414
- data/lib/origami/xfa/connectionset.rb +113 -117
- data/lib/origami/xfa/datasets.rb +38 -42
- data/lib/origami/xfa/localeset.rb +33 -37
- data/lib/origami/xfa/package.rb +49 -52
- data/lib/origami/xfa/pdf.rb +54 -59
- data/lib/origami/xfa/signature.rb +33 -37
- data/lib/origami/xfa/sourceset.rb +34 -38
- data/lib/origami/xfa/stylesheet.rb +35 -39
- data/lib/origami/xfa/template.rb +1630 -1634
- data/lib/origami/xfa/xdc.rb +33 -37
- data/lib/origami/xfa/xfa.rb +132 -123
- data/lib/origami/xfa/xfdf.rb +34 -38
- data/lib/origami/xfa/xmpmeta.rb +34 -38
- data/lib/origami/xfa.rb +50 -53
- data/lib/origami/xreftable.rb +462 -462
- data/lib/origami.rb +37 -38
- data/test/test_actions.rb +22 -20
- data/test/test_annotations.rb +54 -52
- data/test/test_forms.rb +23 -21
- data/test/test_native_types.rb +82 -78
- data/test/test_object_tree.rb +25 -24
- data/test/test_pages.rb +43 -41
- data/test/test_pdf.rb +2 -0
- data/test/test_pdf_attachment.rb +23 -21
- data/test/test_pdf_create.rb +16 -15
- data/test/test_pdf_encrypt.rb +69 -66
- data/test/test_pdf_parse.rb +131 -129
- data/test/test_pdf_parse_lazy.rb +53 -53
- data/test/test_pdf_sign.rb +67 -67
- data/test/test_streams.rb +145 -143
- data/test/test_xrefs.rb +46 -45
- metadata +64 -8
data/lib/origami/acroform.rb
CHANGED
@@ -1,321 +1,320 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# This file is part of Origami, PDF manipulation framework for Ruby
|
5
|
+
# Copyright (C) 2016 Guillaume Delugré.
|
6
|
+
#
|
7
|
+
# Origami is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# Origami is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU Lesser General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
18
|
+
# along with Origami. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
#
|
20
20
|
|
21
21
|
module Origami
|
22
|
+
class PDF
|
23
|
+
#
|
24
|
+
# Returns true if the document contains an acrobat form.
|
25
|
+
#
|
26
|
+
def form?
|
27
|
+
self.Catalog.key? :AcroForm
|
28
|
+
end
|
22
29
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
self.Catalog.key? :AcroForm
|
30
|
-
end
|
31
|
-
|
32
|
-
#
|
33
|
-
# Creates a new AcroForm with specified fields.
|
34
|
-
#
|
35
|
-
def create_form(*fields)
|
36
|
-
acroform = self.Catalog.AcroForm ||= InteractiveForm.new.set_indirect(true)
|
37
|
-
self.add_fields(*fields)
|
30
|
+
#
|
31
|
+
# Creates a new AcroForm with specified fields.
|
32
|
+
#
|
33
|
+
def create_form(*fields)
|
34
|
+
acroform = self.Catalog.AcroForm ||= InteractiveForm.new.set_indirect(true)
|
35
|
+
add_fields(*fields)
|
38
36
|
|
39
|
-
|
40
|
-
|
37
|
+
acroform
|
38
|
+
end
|
41
39
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
40
|
+
#
|
41
|
+
# Add a field to the Acrobat form.
|
42
|
+
# _field_:: The Field to add.
|
43
|
+
#
|
44
|
+
def add_fields(*fields)
|
45
|
+
raise TypeError, "Expected Field arguments" unless fields.all? { |f| f.is_a?(Field) }
|
48
46
|
|
49
|
-
|
50
|
-
|
47
|
+
self.Catalog.AcroForm ||= InteractiveForm.new.set_indirect(true)
|
48
|
+
self.Catalog.AcroForm.Fields ||= []
|
51
49
|
|
52
|
-
|
53
|
-
|
50
|
+
self.Catalog.AcroForm.Fields.concat(fields)
|
51
|
+
fields.each do |field| field.set_indirect(true) end
|
54
52
|
|
55
|
-
|
56
|
-
|
53
|
+
self
|
54
|
+
end
|
57
55
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
56
|
+
#
|
57
|
+
# Returns an Array of Acroform fields.
|
58
|
+
#
|
59
|
+
def fields
|
60
|
+
each_field.to_a
|
61
|
+
end
|
64
62
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
if self.form? and self.Catalog.AcroForm.Fields.is_a?(Array)
|
78
|
-
self.Catalog.AcroForm.Fields.each do |field|
|
79
|
-
yield(field.solve)
|
80
|
-
end
|
81
|
-
end
|
63
|
+
#
|
64
|
+
# Iterates over each Acroform Field.
|
65
|
+
#
|
66
|
+
def each_field
|
67
|
+
unless block_given?
|
68
|
+
return enum_for(__method__) do
|
69
|
+
if form? && self.Catalog.AcroForm.Fields.is_a?(Array)
|
70
|
+
self.Catalog.AcroForm.Fields.length
|
71
|
+
else
|
72
|
+
0
|
73
|
+
end
|
82
74
|
end
|
75
|
+
end
|
83
76
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
def get_field(name)
|
88
|
-
self.each_field do |field|
|
89
|
-
return field if field[:T].solve == name
|
90
|
-
end
|
91
|
-
|
92
|
-
nil
|
77
|
+
if form? && self.Catalog.AcroForm.Fields.is_a?(Array)
|
78
|
+
self.Catalog.AcroForm.Fields.each do |field|
|
79
|
+
yield(field.solve)
|
93
80
|
end
|
81
|
+
end
|
94
82
|
end
|
95
83
|
|
96
84
|
#
|
97
|
-
#
|
85
|
+
# Returns the corresponding named Field.
|
98
86
|
#
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
# Flags relative to signature fields.
|
104
|
-
#
|
105
|
-
module SigFlags
|
106
|
-
SIGNATURES_EXIST = 1 << 0
|
107
|
-
APPEND_ONLY = 1 << 1
|
108
|
-
end
|
87
|
+
def get_field(name)
|
88
|
+
each_field do |field|
|
89
|
+
return field if field[:T].solve == name
|
90
|
+
end
|
109
91
|
|
110
|
-
|
111
|
-
field :NeedAppearances, :Type => Boolean, :Default => false
|
112
|
-
field :SigFlags, :Type => Integer, :Default => 0
|
113
|
-
field :CO, :Type => Array, :Version => "1.3"
|
114
|
-
field :DR, :Type => Dictionary
|
115
|
-
field :DA, :Type => String
|
116
|
-
field :Q, :Type => Integer
|
117
|
-
field :XFA, :Type => [ XFAStream, Array.of(String, XFAStream) ]
|
92
|
+
nil
|
118
93
|
end
|
94
|
+
end
|
119
95
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
BUTTON = :Btn
|
126
|
-
TEXT = :Tx
|
127
|
-
CHOICE = :Ch
|
128
|
-
SIGNATURE = :Sig
|
129
|
-
end
|
96
|
+
#
|
97
|
+
# Class representing a interactive form Dictionary.
|
98
|
+
#
|
99
|
+
class InteractiveForm < Dictionary
|
100
|
+
include StandardObject
|
130
101
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
end
|
102
|
+
#
|
103
|
+
# Flags relative to signature fields.
|
104
|
+
#
|
105
|
+
module SigFlags
|
106
|
+
SIGNATURES_EXIST = 1 << 0
|
107
|
+
APPEND_ONLY = 1 << 1
|
108
|
+
end
|
139
109
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
110
|
+
field :Fields, Type: Array, Required: true, Default: []
|
111
|
+
field :NeedAppearances, Type: Boolean, Default: false
|
112
|
+
field :SigFlags, Type: Integer, Default: 0
|
113
|
+
field :CO, Type: Array, Version: "1.3"
|
114
|
+
field :DR, Type: Dictionary
|
115
|
+
field :DA, Type: String
|
116
|
+
field :Q, Type: Integer
|
117
|
+
field :XFA, Type: [XFAStream, Array.of(String, XFAStream)]
|
118
|
+
end
|
119
|
+
|
120
|
+
module Field
|
121
|
+
#
|
122
|
+
# Types of fields.
|
123
|
+
#
|
124
|
+
module Type
|
125
|
+
BUTTON = :Btn
|
126
|
+
TEXT = :Tx
|
127
|
+
CHOICE = :Ch
|
128
|
+
SIGNATURE = :Sig
|
129
|
+
end
|
145
130
|
|
146
|
-
|
147
|
-
|
131
|
+
#
|
132
|
+
# Flags relative to fields.
|
133
|
+
#
|
134
|
+
module Flags
|
135
|
+
READONLY = 1 << 0
|
136
|
+
REQUIRED = 1 << 1
|
137
|
+
NOEXPORT = 1 << 2
|
138
|
+
end
|
148
139
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
140
|
+
module TextAlign
|
141
|
+
LEFT = 0
|
142
|
+
CENTER = 1
|
143
|
+
RIGHT = 2
|
144
|
+
end
|
154
145
|
|
155
|
-
|
156
|
-
|
157
|
-
receiver.field :Parent, :Type => Field
|
158
|
-
receiver.field :Kids, :Type => Array.of(Field)
|
159
|
-
receiver.field :T, :Type => String
|
160
|
-
receiver.field :TU, :Type => String, :Version => "1.3"
|
161
|
-
receiver.field :TM, :Type => String, :Version => "1.3"
|
162
|
-
receiver.field :Ff, :Type => Integer, :Default => 0
|
163
|
-
receiver.field :V, :Type => Object
|
164
|
-
receiver.field :DV, :Type => Object
|
165
|
-
receiver.field :AA, :Type => AdditionalActions, :Version => "1.2"
|
166
|
-
|
167
|
-
# Variable text fields
|
168
|
-
receiver.field :DA, :Type => String, :Default => "/F1 10 Tf 0 g", :Required => true
|
169
|
-
receiver.field :Q, :Type => Integer, :Default => TextAlign::LEFT
|
170
|
-
receiver.field :DS, :Type => String, :Version => "1.5"
|
171
|
-
receiver.field :RV, :Type => [ String, Stream ], :Version => "1.5"
|
172
|
-
end
|
146
|
+
class AdditionalActions < Dictionary
|
147
|
+
include StandardObject
|
173
148
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
149
|
+
field :K, Type: Dictionary, Version: "1.3"
|
150
|
+
field :F, Type: Dictionary, Version: "1.3"
|
151
|
+
field :V, Type: Dictionary, Version: "1.3"
|
152
|
+
field :C, Type: Dictionary, Version: "1.3"
|
153
|
+
end
|
178
154
|
|
179
|
-
|
180
|
-
|
155
|
+
def self.included(receiver) # :nodoc:
|
156
|
+
receiver.field :FT, Type: Name, Required: true
|
157
|
+
receiver.field :Parent, Type: Field
|
158
|
+
receiver.field :Kids, Type: Array.of(Field)
|
159
|
+
receiver.field :T, Type: String
|
160
|
+
receiver.field :TU, Type: String, Version: "1.3"
|
161
|
+
receiver.field :TM, Type: String, Version: "1.3"
|
162
|
+
receiver.field :Ff, Type: Integer, Default: 0
|
163
|
+
receiver.field :V, Type: Object
|
164
|
+
receiver.field :DV, Type: Object
|
165
|
+
receiver.field :AA, Type: AdditionalActions, Version: "1.2"
|
166
|
+
|
167
|
+
# Variable text fields
|
168
|
+
receiver.field :DA, Type: String, Default: "/F1 10 Tf 0 g", Required: true
|
169
|
+
receiver.field :Q, Type: Integer, Default: TextAlign::LEFT
|
170
|
+
receiver.field :DS, Type: String, Version: "1.5"
|
171
|
+
receiver.field :RV, Type: [String, Stream], Version: "1.5"
|
172
|
+
end
|
181
173
|
|
182
|
-
|
183
|
-
|
184
|
-
#
|
185
|
-
|
186
|
-
self.T = field_name
|
187
|
-
self
|
188
|
-
end
|
174
|
+
def pre_build # :nodoc:
|
175
|
+
unless key?(:T)
|
176
|
+
set_name "field#{object_id}"
|
177
|
+
end
|
189
178
|
|
190
|
-
|
191
|
-
|
192
|
-
#
|
193
|
-
def name=(field_name)
|
194
|
-
self.T = field_name
|
195
|
-
end
|
179
|
+
super
|
180
|
+
end
|
196
181
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
182
|
+
#
|
183
|
+
# Sets the (partial) name of the field.
|
184
|
+
#
|
185
|
+
def set_name(field_name)
|
186
|
+
self.T = field_name
|
187
|
+
self
|
188
|
+
end
|
189
|
+
|
190
|
+
#
|
191
|
+
# Sets the (partial) name of the field.
|
192
|
+
#
|
193
|
+
def name=(field_name)
|
194
|
+
self.T = field_name
|
195
|
+
end
|
203
196
|
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
197
|
+
#
|
198
|
+
# Returns the (partial) name of the field.
|
199
|
+
#
|
200
|
+
def name
|
201
|
+
self.T
|
202
|
+
end
|
208
203
|
|
209
|
-
|
210
|
-
|
211
|
-
|
204
|
+
def onKeyStroke(action)
|
205
|
+
unless action.is_a?(Action)
|
206
|
+
raise TypeError, "An Action object must be passed."
|
207
|
+
end
|
212
208
|
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
end
|
209
|
+
self.AA ||= AdditionalActions.new
|
210
|
+
self.AA.K = action
|
211
|
+
end
|
217
212
|
|
218
|
-
|
219
|
-
|
220
|
-
|
213
|
+
def onFormat(action)
|
214
|
+
unless action.is_a?(Action)
|
215
|
+
raise TypeError, "An Action object must be passed."
|
216
|
+
end
|
221
217
|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
end
|
218
|
+
self.AA ||= AdditionalActions.new
|
219
|
+
self.AA.F = action
|
220
|
+
end
|
226
221
|
|
227
|
-
|
228
|
-
|
229
|
-
|
222
|
+
def onValidate(action)
|
223
|
+
unless action.is_a?(Action)
|
224
|
+
raise TypeError, "An Action object must be passed."
|
225
|
+
end
|
230
226
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
end
|
227
|
+
self.AA ||= AdditionalActions.new
|
228
|
+
self.AA.V = action
|
229
|
+
end
|
235
230
|
|
236
|
-
|
237
|
-
|
238
|
-
|
231
|
+
def onCalculate(action)
|
232
|
+
unless action.is_a?(Action)
|
233
|
+
raise TypeError, "An Action object must be passed."
|
234
|
+
end
|
239
235
|
|
240
|
-
|
241
|
-
|
242
|
-
|
236
|
+
self.AA ||= AdditionalActions.new
|
237
|
+
self.AA.C = action
|
238
|
+
end
|
243
239
|
|
244
|
-
|
245
|
-
|
246
|
-
|
240
|
+
class Subform < Dictionary
|
241
|
+
include StandardObject
|
242
|
+
include Field
|
247
243
|
|
248
|
-
|
244
|
+
def add_fields(*fields)
|
245
|
+
self.Kids ||= []
|
246
|
+
self.Kids.concat(fields)
|
249
247
|
|
250
|
-
|
251
|
-
end
|
252
|
-
end
|
248
|
+
fields.each { |field| field.Parent = self }
|
253
249
|
|
254
|
-
|
255
|
-
|
250
|
+
self
|
251
|
+
end
|
252
|
+
end
|
256
253
|
|
257
|
-
|
258
|
-
|
259
|
-
INCLUDE = :Include
|
260
|
-
EXCLUDE = :Exclude
|
261
|
-
end
|
254
|
+
class SignatureLock < Dictionary
|
255
|
+
include StandardObject
|
262
256
|
|
263
|
-
|
264
|
-
|
265
|
-
|
257
|
+
module Actions
|
258
|
+
ALL = :All
|
259
|
+
INCLUDE = :Include
|
260
|
+
EXCLUDE = :Exclude
|
261
|
+
end
|
266
262
|
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
end
|
263
|
+
field :Type, Type: Name, Default: :SigFieldLock
|
264
|
+
field :Action, Type: Name, Required: true
|
265
|
+
field :Fields, Type: Array
|
271
266
|
|
272
|
-
|
273
|
-
|
267
|
+
def pre_build
|
268
|
+
if self.Action && (self.Action != Actions::ALL)
|
269
|
+
self.Fields ||= []
|
274
270
|
end
|
275
271
|
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
module Digest
|
280
|
-
SHA1 = :SHA1
|
281
|
-
SHA256 = :SHA256
|
282
|
-
SHA384 = :SHA384
|
283
|
-
SHA512 = :SHA512
|
284
|
-
RIPEMD160 = :RIPEMD160
|
285
|
-
end
|
286
|
-
|
287
|
-
field :Type, :Type => Name, :Default => :SV
|
288
|
-
field :Filter, :Type => Name
|
289
|
-
field :SubFilter, :Type => Array
|
290
|
-
field :DigestMethod, :Type => Array, :Default => Digest::SHA1, :Version => "1.7"
|
291
|
-
field :V, :Type => Real, :Default => 1.0
|
292
|
-
field :Cert, :Type => Dictionary
|
293
|
-
field :Reasons, :Type => Array
|
294
|
-
field :MDP, :Type => Dictionary, :Version => "1.6"
|
295
|
-
field :TimeStamp, :Type => Dictionary, :Version => "1.6"
|
296
|
-
field :LegalAttestation, :Type => Array, :Version => "1.6"
|
297
|
-
field :AddRevInfo, :Type => Boolean, :Default => false, :Version => "1.7"
|
298
|
-
field :Ff, :Type => Integer, :Default => 0
|
299
|
-
end
|
272
|
+
super
|
273
|
+
end
|
274
|
+
end
|
300
275
|
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
276
|
+
class SignatureSeedValue < Dictionary
|
277
|
+
include StandardObject
|
278
|
+
|
279
|
+
module Digest
|
280
|
+
SHA1 = :SHA1
|
281
|
+
SHA256 = :SHA256
|
282
|
+
SHA384 = :SHA384
|
283
|
+
SHA512 = :SHA512
|
284
|
+
RIPEMD160 = :RIPEMD160
|
285
|
+
end
|
286
|
+
|
287
|
+
field :Type, Type: Name, Default: :SV
|
288
|
+
field :Filter, Type: Name
|
289
|
+
field :SubFilter, Type: Array
|
290
|
+
field :DigestMethod, Type: Array, Default: Digest::SHA1, Version: "1.7"
|
291
|
+
field :V, Type: Real, Default: 1.0
|
292
|
+
field :Cert, Type: Dictionary
|
293
|
+
field :Reasons, Type: Array
|
294
|
+
field :MDP, Type: Dictionary, Version: "1.6"
|
295
|
+
field :TimeStamp, Type: Dictionary, Version: "1.6"
|
296
|
+
field :LegalAttestation, Type: Array, Version: "1.6"
|
297
|
+
field :AddRevInfo, Type: Boolean, Default: false, Version: "1.7"
|
298
|
+
field :Ff, Type: Integer, Default: 0
|
319
299
|
end
|
320
300
|
|
301
|
+
class CertificateSeedValue < Dictionary
|
302
|
+
include StandardObject
|
303
|
+
|
304
|
+
module URL
|
305
|
+
BROWSER = :Browser
|
306
|
+
ASSP = :ASSP
|
307
|
+
end
|
308
|
+
|
309
|
+
field :Type, Type: Name, Default: :SVCert
|
310
|
+
field :Subject, Type: Array
|
311
|
+
field :SubjectDN, Type: Array, Version: "1.7"
|
312
|
+
field :KeyUsage, Type: Array, Version: "1.7"
|
313
|
+
field :Issuer, Type: Array
|
314
|
+
field :OID, Type: Array
|
315
|
+
field :URL, Type: String
|
316
|
+
field :URLType, Type: Name, Default: URL::BROWSER, Version: "1.7"
|
317
|
+
field :Ff, Type: Integer, Default: 0
|
318
|
+
end
|
319
|
+
end
|
321
320
|
end
|