hexapdf 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +69 -0
  3. data/data/hexapdf/cert/demo_cert.rb +22 -0
  4. data/data/hexapdf/cert/root-ca.crt +119 -0
  5. data/data/hexapdf/cert/signing.crt +125 -0
  6. data/data/hexapdf/cert/signing.key +52 -0
  7. data/data/hexapdf/cert/sub-ca.crt +125 -0
  8. data/lib/hexapdf/cli/info.rb +21 -1
  9. data/lib/hexapdf/configuration.rb +26 -0
  10. data/lib/hexapdf/content/graphics_state.rb +24 -5
  11. data/lib/hexapdf/content/processor.rb +1 -1
  12. data/lib/hexapdf/document/signatures.rb +327 -0
  13. data/lib/hexapdf/document.rb +26 -0
  14. data/lib/hexapdf/encryption/standard_security_handler.rb +1 -2
  15. data/lib/hexapdf/importer.rb +1 -1
  16. data/lib/hexapdf/layout/style.rb +2 -1
  17. data/lib/hexapdf/object.rb +5 -3
  18. data/lib/hexapdf/parser.rb +21 -9
  19. data/lib/hexapdf/rectangle.rb +0 -6
  20. data/lib/hexapdf/revision.rb +13 -6
  21. data/lib/hexapdf/type/acro_form/appearance_generator.rb +2 -4
  22. data/lib/hexapdf/type/acro_form/field.rb +2 -0
  23. data/lib/hexapdf/type/acro_form/form.rb +9 -1
  24. data/lib/hexapdf/type/annotation.rb +36 -3
  25. data/lib/hexapdf/type/font.rb +5 -0
  26. data/lib/hexapdf/type/font_simple.rb +1 -1
  27. data/lib/hexapdf/type/font_type3.rb +20 -0
  28. data/lib/hexapdf/type/object_stream.rb +3 -1
  29. data/lib/hexapdf/type/signature/adbe_pkcs7_detached.rb +125 -0
  30. data/lib/hexapdf/type/signature/adbe_x509_rsa_sha1.rb +99 -0
  31. data/lib/hexapdf/type/signature/handler.rb +112 -0
  32. data/lib/hexapdf/type/signature/verification_result.rb +92 -0
  33. data/lib/hexapdf/type/signature.rb +236 -0
  34. data/lib/hexapdf/type.rb +1 -0
  35. data/lib/hexapdf/version.rb +1 -1
  36. data/lib/hexapdf/writer.rb +24 -10
  37. data/test/hexapdf/content/test_graphics_state.rb +9 -1
  38. data/test/hexapdf/content/test_operator.rb +8 -3
  39. data/test/hexapdf/content/test_processor.rb +1 -1
  40. data/test/hexapdf/document/test_signatures.rb +225 -0
  41. data/test/hexapdf/encryption/test_standard_security_handler.rb +8 -6
  42. data/test/hexapdf/layout/test_style.rb +11 -0
  43. data/test/hexapdf/test_document.rb +28 -0
  44. data/test/hexapdf/test_object.rb +7 -2
  45. data/test/hexapdf/test_parser.rb +14 -0
  46. data/test/hexapdf/test_rectangle.rb +0 -7
  47. data/test/hexapdf/test_revision.rb +44 -14
  48. data/test/hexapdf/test_writer.rb +44 -14
  49. data/test/hexapdf/type/acro_form/test_field.rb +11 -1
  50. data/test/hexapdf/type/acro_form/test_form.rb +5 -0
  51. data/test/hexapdf/type/signature/common.rb +71 -0
  52. data/test/hexapdf/type/signature/test_adbe_pkcs7_detached.rb +99 -0
  53. data/test/hexapdf/type/signature/test_adbe_x509_rsa_sha1.rb +66 -0
  54. data/test/hexapdf/type/signature/test_handler.rb +76 -0
  55. data/test/hexapdf/type/signature/test_verification_result.rb +47 -0
  56. data/test/hexapdf/type/test_annotation.rb +40 -2
  57. data/test/hexapdf/type/test_font.rb +4 -0
  58. data/test/hexapdf/type/test_font_simple.rb +5 -5
  59. data/test/hexapdf/type/test_font_type3.rb +16 -1
  60. data/test/hexapdf/type/test_object_stream.rb +9 -0
  61. data/test/hexapdf/type/test_signature.rb +131 -0
  62. metadata +21 -33
  63. data/test/data/cert/create.sh +0 -171
  64. data/test/data/cert/root-ca/certs/84E66B6F4C359E741C0AFA014790DF39.pem +0 -119
  65. data/test/data/cert/root-ca/certs/84E66B6F4C359E741C0AFA014790DF3A.pem +0 -125
  66. data/test/data/cert/root-ca/db/crlnumber +0 -1
  67. data/test/data/cert/root-ca/db/index +0 -2
  68. data/test/data/cert/root-ca/db/index.attr +0 -1
  69. data/test/data/cert/root-ca/db/index.attr.old +0 -1
  70. data/test/data/cert/root-ca/db/index.old +0 -1
  71. data/test/data/cert/root-ca/db/serial +0 -1
  72. data/test/data/cert/root-ca/db/serial.old +0 -1
  73. data/test/data/cert/root-ca/private/root-ca.key +0 -52
  74. data/test/data/cert/root-ca/root-ca.conf +0 -65
  75. data/test/data/cert/root-ca/root-ca.crt +0 -119
  76. data/test/data/cert/root-ca/root-ca.csr +0 -28
  77. data/test/data/cert/signature-1-pkcs7-detached.pdf +0 -182
  78. data/test/data/cert/sub-ca/certs/453FF080E3EDCD6A388D5368DFC320D9.pem +0 -125
  79. data/test/data/cert/sub-ca/db/crlnumber +0 -1
  80. data/test/data/cert/sub-ca/db/index +0 -1
  81. data/test/data/cert/sub-ca/db/index.attr +0 -1
  82. data/test/data/cert/sub-ca/db/index.old +0 -0
  83. data/test/data/cert/sub-ca/db/serial +0 -1
  84. data/test/data/cert/sub-ca/db/serial.old +0 -1
  85. data/test/data/cert/sub-ca/private/signing.key +0 -52
  86. data/test/data/cert/sub-ca/private/sub-ca.key +0 -52
  87. data/test/data/cert/sub-ca/signing.crt +0 -125
  88. data/test/data/cert/sub-ca/signing.csr +0 -28
  89. data/test/data/cert/sub-ca/signing.p12 +0 -0
  90. data/test/data/cert/sub-ca/sub-ca.conf +0 -65
  91. data/test/data/cert/sub-ca/sub-ca.crt +0 -125
  92. data/test/data/cert/sub-ca/sub-ca.csr +0 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55ddbf5c737ab446c5793660957e64aaf6f8872c6bb1c4a76ba39a87193b951f
4
- data.tar.gz: eb29fbb41cbb20c060c43cc80406bd4b11fa36b0d86a95daa9d1093d060ab89e
3
+ metadata.gz: afdc2d646f24ddd3dacfb52ddc7b0f0d1de9dfdaff138e615a2126e16c86d1f4
4
+ data.tar.gz: 482f839f70fe4f68d9006f3e8db7427a27d9fbc7a71da219da63653ddfeedb3a
5
5
  SHA512:
6
- metadata.gz: 28368cd415cd9adf28050df8812a0cda999b8140fcba4a9f307d7e37f6dc0254d99abf5173a81a1b2b59f9f6a658a46f6998d7834b93ffc19840d578e507ce92
7
- data.tar.gz: b25e409653a4bd9359f3a39c2920187261a43151942c4120d2bd818886dbf236f77483a42ca7a7fb39ffbcdfc7da8cf9d7a87609a4f4af514cf7f93f495eb5ed
6
+ metadata.gz: 40c32b6df0f349e3f071e54b37fd546f1c87aef0fd645b9990b5e3b6cfa1c5c0bedb734bbc91b3fb09d968f95fdd8e6b78be004383920583cf91f920aa1623ea
7
+ data.tar.gz: e9f3f0a0fa0850e2adb308999d2edd7561ecf1871cbd7b2e244ff6f9144b97466a24afa7ebdadb9f27fc8fcb7964ddd913dc3a41c0b46aed01fd10bc4e26c92a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,72 @@
1
+ ## 0.20.0 - 2021-12-30
2
+
3
+ ### Added
4
+
5
+ * Support for signing a PDF using a digital signature
6
+ * Support for reading and validating digital signatures
7
+ * Output info regarding digital signatures when using the `hexapdf info` command
8
+ * [HexaPDF::Type::AcroForm::Form#create_signature_field] for adding signature
9
+ fields
10
+ * [HexaPDF::Type::Annotation::AppearanceDictionary#set_appearance] for setting
11
+ the appearance stream
12
+ * [HexaPDF::Type::Annotation#create_appearance] for creating an empty appearance
13
+ stream
14
+
15
+ ### Changed
16
+
17
+ * **Breaking change**: Method signature of
18
+ [HexaPDF::Type::Annotation#appearance] changed
19
+ * [HexaPDF::Object#==] to allow comparison to simple value if not indirect
20
+ * [HexaPDF::Type::AcroForm::Form] to use an empty array as default for the
21
+ /Fields field
22
+ * [HexaPDF::Type::ObjectStream] to not store signature fields in object streams
23
+ * [HexaPDF::Writer] to return the last written cross-reference section
24
+ * [HexaPDF::Type::AcroForm::Field#create_widget] to automatically set the print
25
+ flag and assign the page
26
+
27
+ ### Fixed
28
+
29
+ * Incremental writing of files in cases where object streams were deleted (e.g.
30
+ when using the `optimize: true` argument when writing)
31
+ * Comparison of non-indirect [HexaPDF::Object] instances with other
32
+ HexaPDF::Object instances
33
+ * Deleting of objects via [HexaPDF::Revision#delete] to re-use the
34
+ [HexaPDF::PDFData] object of the deleted object when using
35
+ `mark_as_free: true`
36
+ * [HexaPDF::Revision#each_modified_object] to work correctly for dictionary
37
+ objects even if a value is changed only by reading it
38
+
39
+
40
+ ## 0.19.3 - 2021-12-14
41
+
42
+ ### Fixed
43
+
44
+ * Handling of invalid files where the "startxref" keyword and its value are on
45
+ the same line
46
+
47
+
48
+ ## 0.19.2 - 2021-12-14
49
+
50
+ ### Fixed
51
+
52
+ * Set the trailer's ID field to an array of two empty strings when decrypting in
53
+ case it is missing
54
+ * Incremental writing when one of the existing revisions contains a
55
+ cross-reference stream
56
+
57
+
58
+ ## 0.19.1 - 2021-12-12
59
+
60
+ ### Added
61
+
62
+ * [HexaPDF::Type::FontType3#bounding_box] to fix content stream processing error
63
+
64
+ ### Fixed
65
+
66
+ * Calculation of scaled font size for [HexaPDF::Content::GraphicsState] and
67
+ [HexaPDF::Layout::Style] when Type3 fonts are used
68
+
69
+
1
70
  ## 0.19.0 - 2021-11-24
2
71
 
3
72
  ### Added
@@ -0,0 +1,22 @@
1
+ require 'hexapdf'
2
+ require 'openssl'
3
+
4
+ DemoCertData = Struct.new(:key, :cert, :sub_ca, :root_ca)
5
+
6
+ module HexaPDF
7
+
8
+ class << self
9
+ attr_reader :demo_cert
10
+ end
11
+
12
+ cert_file = File.join(__dir__, 'signing.crt')
13
+ key_file = File.join(__dir__, 'signing.key')
14
+ sub_ca_cert_file = File.join(__dir__, 'sub-ca.crt')
15
+ root_ca_cert_file = File.join(__dir__, 'root-ca.crt')
16
+
17
+ @demo_cert = DemoCertData.new(OpenSSL::PKey::RSA.new(File.read(key_file)),
18
+ OpenSSL::X509::Certificate.new(File.read(cert_file)),
19
+ OpenSSL::X509::Certificate.new(File.read(sub_ca_cert_file)),
20
+ OpenSSL::X509::Certificate.new(File.read(root_ca_cert_file)))
21
+
22
+ end
@@ -0,0 +1,119 @@
1
+ Certificate:
2
+ Data:
3
+ Version: 3 (0x2)
4
+ Serial Number:
5
+ 90:c2:b5:e9:6a:fd:70:e4:55:b0:6e:c8:5d:4b:c2:66
6
+ Signature Algorithm: sha256WithRSAEncryption
7
+ Issuer: C=AT, O=HexaPDF, CN=HexaPDF Demo Root CA
8
+ Validity
9
+ Not Before: Dec 22 08:24:17 2021 GMT
10
+ Not After : Nov 28 08:24:17 2121 GMT
11
+ Subject: C=AT, O=HexaPDF, CN=HexaPDF Demo Root CA
12
+ Subject Public Key Info:
13
+ Public Key Algorithm: rsaEncryption
14
+ RSA Public-Key: (4096 bit)
15
+ Modulus:
16
+ 00:b9:f8:13:06:0a:29:d2:8e:0a:29:e5:0b:65:c9:
17
+ 74:f8:b0:ca:4f:39:6c:46:4c:4e:41:a7:a5:f9:9a:
18
+ 27:f2:1e:4c:bb:36:c2:d2:3a:6e:c7:89:cf:08:62:
19
+ 96:48:9f:bb:60:3c:cf:e3:e3:0e:1c:d7:54:89:c5:
20
+ 27:b2:8a:da:a7:bb:e7:2a:29:76:53:bd:8d:36:8e:
21
+ ab:e1:63:74:48:b9:6f:ac:1a:2f:4e:4a:9b:8f:70:
22
+ d3:2d:19:c3:85:26:21:4f:6d:c3:1c:a7:63:6e:ae:
23
+ 00:ad:93:4e:57:fe:29:1b:80:bc:52:bf:6d:aa:a7:
24
+ dc:3f:a3:40:3e:d0:22:ca:c3:cd:1e:d2:72:01:82:
25
+ f0:a2:a9:66:bf:e3:7b:6c:6a:d6:f3:c1:75:ab:0c:
26
+ 9c:93:3e:11:bf:8d:ee:33:9b:95:9e:e9:df:55:23:
27
+ 17:94:fc:10:6f:69:a4:e0:0b:37:92:1f:2b:bf:07:
28
+ 14:f8:16:cd:d9:b7:80:df:a8:d8:34:49:77:ee:0e:
29
+ 3d:4f:3c:7d:fb:95:ff:d5:8a:63:a1:cf:d9:e4:3d:
30
+ 39:b3:7c:e7:8c:d5:28:f4:bb:c4:70:ca:d9:8b:a9:
31
+ 39:09:8e:bf:7a:b1:5e:d1:76:1f:a7:66:9b:03:70:
32
+ 15:47:10:58:06:e0:b7:c0:28:b9:7b:70:91:bf:7d:
33
+ 00:12:bc:98:0b:f8:a7:74:f5:3f:ac:18:39:20:bb:
34
+ 5a:11:2d:e4:04:49:8b:8b:77:f8:5a:2f:e2:58:e4:
35
+ 22:2e:6c:b6:22:3e:b4:c7:71:6a:48:31:78:71:47:
36
+ ec:8b:2f:26:86:cd:6d:cc:2c:64:b8:6b:a6:68:10:
37
+ f9:3a:35:36:6d:a3:1e:b6:e3:40:b8:0b:88:29:52:
38
+ 45:85:65:9a:fe:0a:63:16:97:46:46:ac:cc:2d:32:
39
+ d6:79:cc:2a:94:58:2c:1d:35:b7:1d:42:03:32:73:
40
+ dd:91:23:6d:15:17:d0:b6:bb:66:b4:f1:a8:9d:ff:
41
+ e4:54:fa:7f:56:50:5c:e7:7c:2d:c0:1d:36:29:10:
42
+ f0:9e:44:4e:c8:3b:93:53:26:ce:fc:0e:be:8c:3a:
43
+ a8:2d:7f:b9:93:70:7c:b2:35:43:be:74:e9:53:f5:
44
+ b6:a5:bc:b2:11:e7:d7:e2:6f:92:a9:54:bd:b7:d8:
45
+ 93:a1:24:0b:2f:4a:a6:92:67:95:03:c0:3b:37:b4:
46
+ aa:e6:36:7b:a5:2b:e0:5b:2f:a4:27:6b:52:e7:c0:
47
+ 2e:6e:b1:21:5b:3e:b1:2b:e1:cb:ad:c3:bb:8c:6b:
48
+ f8:1b:8b:08:e3:c9:91:b8:11:6c:76:1b:2c:26:70:
49
+ 4d:e4:ff:8b:c7:6a:fe:db:c1:c7:85:dc:e4:cd:35:
50
+ 94:d5:2d
51
+ Exponent: 65537 (0x10001)
52
+ X509v3 extensions:
53
+ X509v3 Basic Constraints: critical
54
+ CA:TRUE
55
+ X509v3 Key Usage: critical
56
+ Certificate Sign, CRL Sign
57
+ X509v3 Subject Key Identifier:
58
+ B0:45:1A:51:FB:96:CE:62:C7:FD:5E:73:CF:F9:9A:E0:71:F8:AC:61
59
+ Signature Algorithm: sha256WithRSAEncryption
60
+ 77:65:4e:a4:e0:e2:09:ae:fb:e8:6f:80:a9:4b:1c:53:5c:48:
61
+ db:ee:02:3a:f9:28:16:a8:7d:31:14:be:95:0d:48:1a:9e:de:
62
+ b5:fa:21:75:de:b0:da:c0:32:00:fc:4f:eb:bf:68:08:80:e2:
63
+ 33:15:4f:36:8b:05:3a:6d:20:57:64:7f:02:7a:a3:b8:ab:4d:
64
+ 44:b4:4e:1c:58:f7:96:15:ec:09:b9:8b:d0:f5:20:d3:7a:ef:
65
+ e0:54:63:8d:d5:1e:51:55:f5:a0:4f:4c:35:9e:60:11:14:2b:
66
+ 44:85:ee:5d:da:d8:c2:b2:44:04:b9:e6:20:21:4f:b9:01:60:
67
+ 7e:7b:98:07:75:6d:8c:68:11:4f:f6:0b:18:5e:d6:1a:30:db:
68
+ e5:9a:66:c3:cb:97:5d:4e:41:87:35:29:2c:0e:b1:cf:37:d2:
69
+ b8:bd:04:74:c3:46:0b:90:68:fb:d1:a9:5c:ef:44:06:af:41:
70
+ db:fb:16:99:4e:97:dd:f6:71:f5:e6:fe:c0:a8:aa:68:4c:17:
71
+ 9c:a0:58:db:3f:35:75:aa:d0:e3:00:f1:21:e5:45:93:29:49:
72
+ a5:af:15:e1:b0:63:5f:e3:69:fc:80:d7:c5:c9:df:33:ab:28:
73
+ 83:57:12:c7:16:c4:88:96:bb:d4:67:4b:7d:06:ab:9e:15:ad:
74
+ 6d:84:bf:77:0b:2d:c4:a4:52:5b:b7:a1:dd:50:10:49:24:a2:
75
+ 36:ef:d4:13:72:47:81:c9:84:34:ce:0b:fe:2e:26:cf:52:eb:
76
+ 59:27:86:f3:72:26:02:05:d1:c6:51:8c:b1:5b:fd:30:54:f9:
77
+ 9b:38:b0:f0:d2:8f:a3:7f:3d:5c:76:04:76:62:f1:d1:a4:96:
78
+ 17:2d:d8:a9:df:7d:1f:03:73:67:05:66:3d:e5:9e:64:55:3c:
79
+ 17:30:39:ac:db:7c:94:1e:d4:71:5f:d3:75:5f:fa:98:53:89:
80
+ 9d:f6:32:e4:c8:79:26:f3:7b:2d:af:76:5b:38:c0:1f:f8:49:
81
+ c7:b2:e4:9c:d9:ea:98:24:9c:60:d4:bb:65:66:ce:90:70:29:
82
+ a2:c9:04:e9:fc:b9:4e:6a:bb:02:ce:a3:7e:b5:b2:a0:d1:12:
83
+ 48:57:a6:73:8b:b4:9b:10:6e:76:5f:bc:1b:e3:29:cf:4a:0e:
84
+ 0d:cc:9d:bb:23:2d:e3:37:7a:92:53:38:8c:54:d5:7a:d8:90:
85
+ 70:f5:c6:ce:c8:1c:01:fd:47:0e:21:20:e9:19:b4:a5:ce:cb:
86
+ d1:29:17:1a:1c:be:6f:43:6d:d0:75:5e:01:49:2c:46:c9:9e:
87
+ f6:41:54:e8:17:aa:ae:07:fb:7b:16:1f:de:ee:f6:da:65:3e:
88
+ d0:84:2c:c2:0e:63:e8:42
89
+ -----BEGIN CERTIFICATE-----
90
+ MIIFSzCCAzOgAwIBAgIRAJDCtelq/XDkVbBuyF1LwmYwDQYJKoZIhvcNAQELBQAw
91
+ PjELMAkGA1UEBhMCQVQxEDAOBgNVBAoMB0hleGFQREYxHTAbBgNVBAMMFEhleGFQ
92
+ REYgRGVtbyBSb290IENBMCAXDTIxMTIyMjA4MjQxN1oYDzIxMjExMTI4MDgyNDE3
93
+ WjA+MQswCQYDVQQGEwJBVDEQMA4GA1UECgwHSGV4YVBERjEdMBsGA1UEAwwUSGV4
94
+ YVBERiBEZW1vIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
95
+ AQC5+BMGCinSjgop5QtlyXT4sMpPOWxGTE5Bp6X5mifyHky7NsLSOm7Hic8IYpZI
96
+ n7tgPM/j4w4c11SJxSeyitqnu+cqKXZTvY02jqvhY3RIuW+sGi9OSpuPcNMtGcOF
97
+ JiFPbcMcp2NurgCtk05X/ikbgLxSv22qp9w/o0A+0C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u3od1QEEkkojbv1BNyR4HJhDTOC/4uJs9S61knhvNyJgIF0cZRjLFb/TBU
114
+ +Zs4sPDSj6N/PVx2BHZi8dGklhct2KnffR8Dc2cFZj3lnmRVPBcwOazbfJQe1HFf
115
+ 03Vf+phTiZ32MuTIeSbzey2vdls4wB/4Scey5JzZ6pgknGDUu2VmzpBwKaLJBOn8
116
+ uU5quwLOo361sqDREkhXpnOLtJsQbnZfvBvjKc9KDg3MnbsjLeM3epJTOIxU1XrY
117
+ kHD1xs7IHAH9Rw4hIOkZtKXOy9EpFxocvm9DbdB1XgFJLEbJnvZBVOgXqq4H+3sW
118
+ H97u9tplPtCELMIOY+hC
119
+ -----END CERTIFICATE-----
@@ -0,0 +1,125 @@
1
+ Certificate:
2
+ Data:
3
+ Version: 3 (0x2)
4
+ Serial Number:
5
+ 86:b1:44:1b:63:e9:10:bb:4e:ca:53:53:c0:69:cb:89
6
+ Signature Algorithm: sha256WithRSAEncryption
7
+ Issuer: C=AT, O=HexaPDF, CN=HexaPDF Demo Subordinate CA
8
+ Validity
9
+ Not Before: Dec 22 08:24:19 2021 GMT
10
+ Not After : Nov 28 08:24:19 2121 GMT
11
+ Subject: C=AT, O=HexaPDF, CN=HexaPDF Demo Certifcate
12
+ Subject Public Key Info:
13
+ Public Key Algorithm: rsaEncryption
14
+ RSA Public-Key: (4096 bit)
15
+ Modulus:
16
+ 00:c8:72:46:f4:29:42:13:1c:b7:a3:17:5d:d3:ee:
17
+ 08:42:3d:30:3a:ea:94:74:b5:8d:75:31:b3:a3:4d:
18
+ c2:6b:56:07:dc:8f:a0:fe:ec:4f:a6:18:df:8b:84:
19
+ 5b:ad:0d:00:c4:d4:dd:bf:bc:49:c7:05:98:c0:3c:
20
+ 8d:25:7d:2b:22:c4:4b:f4:be:46:f5:47:94:76:14:
21
+ 2e:bf:01:c5:e6:8f:00:1b:b2:de:0b:17:b1:44:30:
22
+ 26:4e:99:49:29:1a:e8:d4:72:bb:3c:b8:ed:60:2b:
23
+ f7:a4:df:27:c9:56:58:a0:1f:88:18:2a:0b:91:fd:
24
+ 79:d0:74:2a:b4:c6:23:9c:f6:ad:41:35:71:06:fc:
25
+ 71:b7:c4:40:b8:57:46:79:5b:8f:78:c2:c0:87:0a:
26
+ ab:e5:57:4e:83:a7:0f:44:9c:d8:3b:42:d7:0f:e8:
27
+ 91:ee:51:0b:bf:e6:70:9d:13:f4:86:ff:2c:bb:cb:
28
+ 2e:e2:5e:66:d5:68:d4:9e:ce:a4:60:98:e2:ed:61:
29
+ 83:c7:96:33:42:93:5b:78:e1:e1:59:90:bb:c4:ae:
30
+ 45:12:a3:14:6a:a7:34:13:94:f5:4b:4d:fc:85:77:
31
+ 34:49:9b:b4:07:ac:a4:89:80:4e:6a:2c:aa:f3:b4:
32
+ 9d:df:33:e1:4c:05:a3:97:f9:3f:bf:0a:da:bc:19:
33
+ d6:01:dc:a0:98:a7:19:f4:73:c9:d4:9f:ea:e8:6c:
34
+ 60:6e:01:bb:fc:7a:f4:a8:16:43:16:c9:12:f5:09:
35
+ 57:7e:c0:c6:96:9d:69:fe:e8:76:f5:12:e5:e3:7b:
36
+ 55:f9:69:d9:23:aa:b7:25:83:42:50:7f:26:11:2b:
37
+ a6:d1:eb:40:6a:37:29:59:6f:53:4c:5b:dd:b2:21:
38
+ 1f:19:a5:c8:a5:d2:b2:c9:5f:c0:c4:e8:1f:d5:b4:
39
+ 5b:f1:46:53:18:69:21:01:63:b9:96:d4:ae:22:9b:
40
+ ed:c0:95:82:da:56:68:67:d1:a1:65:d9:3c:3b:ec:
41
+ 7f:ce:21:41:cf:48:e3:ed:1f:45:79:ec:8a:03:8e:
42
+ 51:34:e0:e2:02:68:62:c7:9b:53:5b:09:26:e7:68:
43
+ 70:57:85:05:da:e1:ba:12:06:90:75:77:0f:5a:e5:
44
+ f1:12:a5:79:51:82:e0:b1:91:74:30:9f:10:b9:2a:
45
+ b8:19:d5:37:7a:1d:cb:b3:16:15:b6:39:0e:b2:86:
46
+ 52:6b:8d:f9:46:e1:bc:f0:87:57:45:11:82:dc:85:
47
+ 85:16:5e:e7:eb:97:08:79:1d:2a:81:79:a5:6b:9e:
48
+ 55:f1:a7:35:1a:a7:aa:89:d1:bf:d0:b8:3b:15:40:
49
+ f6:25:01:62:d9:be:40:71:75:03:f3:c3:72:54:d7:
50
+ 50:8d:07
51
+ Exponent: 65537 (0x10001)
52
+ X509v3 extensions:
53
+ X509v3 Authority Key Identifier:
54
+ keyid:44:00:ED:DC:BF:56:82:17:0B:8A:0B:77:AF:68:B1:3B:18:51:DD:0E
55
+
56
+ X509v3 Basic Constraints: critical
57
+ CA:FALSE
58
+ X509v3 Extended Key Usage:
59
+ TLS Web Client Authentication
60
+ X509v3 Key Usage: critical
61
+ Digital Signature
62
+ X509v3 Subject Key Identifier:
63
+ CB:03:E6:4E:5F:E5:2B:AA:C8:6D:CA:1C:2E:A7:F4:4C:2E:C9:8B:02
64
+ Signature Algorithm: sha256WithRSAEncryption
65
+ 05:43:fe:bb:57:66:bf:18:ae:95:df:9e:fb:39:bd:1f:4b:e3:
66
+ e4:e3:07:f5:60:f0:1e:31:5b:df:31:76:3b:77:11:7d:dc:b1:
67
+ 99:b0:aa:41:6a:7b:ae:8a:2b:78:ca:17:87:7a:38:bb:7d:1a:
68
+ 5a:bd:c4:17:9b:15:af:6a:b9:19:a9:c1:b8:c9:ce:07:93:b9:
69
+ ec:6b:e2:f1:65:fc:61:a0:e0:c6:77:64:01:2b:48:56:81:4d:
70
+ c8:2d:ed:60:fd:fe:4d:bd:86:14:53:6d:db:d6:77:eb:ed:29:
71
+ 28:82:ec:7a:44:82:8b:2b:83:be:70:95:08:21:f2:40:56:8e:
72
+ fa:4e:95:6e:fb:48:72:33:fb:76:bb:c1:3e:32:95:c3:95:25:
73
+ 02:9c:15:1d:dd:bb:53:da:35:46:2c:bd:51:79:4e:ac:0e:35:
74
+ 98:f8:8f:f9:c4:dd:41:c7:c5:ef:c8:b5:8f:f8:b2:03:f0:ae:
75
+ 4a:38:84:76:7c:e4:ad:b0:ce:c8:87:8e:57:25:cc:9b:ff:0b:
76
+ de:85:c6:7b:82:2a:cf:d6:18:7a:bd:2f:96:57:7f:72:c6:53:
77
+ d2:cf:0f:14:23:87:ab:0b:8a:7c:87:c3:32:ba:54:5b:50:08:
78
+ bf:a8:8d:5a:cb:6f:7e:aa:2a:3a:06:58:a8:aa:f8:74:ad:c7:
79
+ 85:f7:7d:4f:9f:5c:b7:16:61:35:75:4f:cc:bc:4c:ca:fa:15:
80
+ 46:1f:dc:c3:b9:59:de:9e:13:fb:dc:9d:71:21:ef:7b:68:20:
81
+ 21:50:2c:50:a4:e7:b6:dc:cc:72:34:df:d5:72:a1:23:c4:34:
82
+ 0b:29:5f:7d:ed:b3:1e:3c:e0:88:8f:7f:b3:5d:e8:68:96:63:
83
+ 05:d7:c0:2c:eb:0d:10:cf:b2:69:6f:d6:db:22:c5:71:90:17:
84
+ de:5b:b9:5e:22:dc:94:40:ad:8c:29:45:00:5b:93:39:0e:6b:
85
+ 49:5f:c1:d8:7b:e9:05:03:1f:42:97:94:2c:c9:0c:c3:41:02:
86
+ aa:26:02:42:94:03:18:44:c4:2b:cd:a2:54:eb:9c:6a:04:9b:
87
+ f3:45:75:ff:8f:38:0c:a9:91:b1:c2:ff:34:d9:d6:2a:5f:4f:
88
+ 74:a7:0c:96:df:8a:59:f2:ff:66:79:90:1b:f9:c6:88:99:b5:
89
+ e9:46:27:ea:00:95:e6:92:2c:ab:1e:d2:7a:80:55:8c:fc:fa:
90
+ 8d:6c:db:42:1e:c0:26:e8:f8:8c:a2:85:bd:4a:37:ca:5a:56:
91
+ f4:fe:91:d8:81:c8:b9:69:22:53:52:8a:1e:7e:df:c2:70:d6:
92
+ 7a:b7:4b:89:6e:4e:f3:6a:22:d1:2a:53:17:df:b7:29:68:4a:
93
+ e0:7d:a9:fb:43:ad:34:b0
94
+ -----BEGIN CERTIFICATE-----
95
+ MIIFiDCCA3CgAwIBAgIRAIaxRBtj6RC7TspTU8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111
+ AaN1MHMwHwYDVR0jBBgwFoAURADt3L9WghcLigt3r2ixOxhR3Q4wDAYDVR0TAQH/
112
+ BAIwADATBgNVHSUEDDAKBggrBgEFBQcDAjAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0O
113
+ BBYEFMsD5k5f5SuqyG3KHC6n9EwuyYsCMA0GCSqGSIb3DQEBCwUAA4ICAQAFQ/67
114
+ V2a/GK6V3577Ob0fS+Pk4wf1YPAeMVvfMXY7dxF93LGZsKpBanuuiit4yheHeji7
115
+ fRpavcQXmxWvarkZqcG4yc4Hk7nsa+LxZfxhoODGd2QBK0hWgU3ILe1g/f5NvYYU
116
+ U23b1nfr7Skogux6RIKLK4O+cJUIIfJAVo76TpVu+0hyM/t2u8E+MpXDlSUCnBUd
117
+ 3btT2jVGLL1ReU6sDjWY+I/5xN1Bx8XvyLWP+LID8K5KOIR2fOStsM7Ih45XJcyb
118
+ /wvehcZ7girP1hh6vS+WV39yxlPSzw8UI4erC4p8h8MyulRbUAi/qI1ay29+qio6
119
+ Blioqvh0rceF931Pn1y3FmE1dU/MvEzK+hVGH9zDuVnenhP73J1xIe97aCAhUCxQ
120
+ pOe23MxyNN/VcqEjxDQLKV997bMePOCIj3+zXeholmMF18As6w0Qz7Jpb9bbIsVx
121
+ kBfeW7leItyUQK2MKUUAW5M5DmtJX8HYe+kFAx9Cl5QsyQzDQQKqJgJClAMYRMQr
122
+ zaJU65xqBJvzRXX/jzgMqZGxwv802dYqX090pwyW34pZ8v9meZAb+caImbXpRifq
123
+ AJXmkiyrHtJ6gFWM/PqNbNtCHsAm6PiMooW9SjfKWlb0/pHYgci5aSJTUooeft/C
124
+ cNZ6t0uJbk7zaiLRKlMX37cpaErgfan7Q600sA==
125
+ -----END CERTIFICATE-----
@@ -0,0 +1,52 @@
1
+ -----BEGIN PRIVATE KEY-----
2
+ MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDIckb0KUITHLej
3
+ F13T7ghCPTA66pR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XotNFVt
50
+ mvyisPO2dFyl6oCpyhS/uwuR2wmcIKhVbIcBx9vOWkO8i2CCjTcU1WSWGzZegYso
51
+ P5BZdi+tRIj8RCULp7mURlkyRLPdaw==
52
+ -----END PRIVATE KEY-----
@@ -0,0 +1,125 @@
1
+ Certificate:
2
+ Data:
3
+ Version: 3 (0x2)
4
+ Serial Number:
5
+ 90:c2:b5:e9:6a:fd:70:e4:55:b0:6e:c8:5d:4b:c2:67
6
+ Signature Algorithm: sha256WithRSAEncryption
7
+ Issuer: C=AT, O=HexaPDF, CN=HexaPDF Demo Root CA
8
+ Validity
9
+ Not Before: Dec 22 08:24:19 2021 GMT
10
+ Not After : Nov 28 08:24:19 2121 GMT
11
+ Subject: C=AT, O=HexaPDF, CN=HexaPDF Demo Subordinate CA
12
+ Subject Public Key Info:
13
+ Public Key Algorithm: rsaEncryption
14
+ RSA Public-Key: (4096 bit)
15
+ Modulus:
16
+ 00:bf:a7:a2:ca:a2:32:ff:e4:8c:83:9f:26:85:ec:
17
+ ac:d3:d9:5c:f0:23:9a:34:1d:db:51:d2:03:90:21:
18
+ e7:0e:24:59:9b:79:7a:5d:3a:b6:52:95:cf:99:0d:
19
+ 5f:eb:25:8c:2f:1b:af:6b:ab:ea:e4:96:db:b3:4a:
20
+ 64:dd:fc:1f:9e:ba:47:c3:cf:5b:a9:47:3c:f6:e5:
21
+ 4b:2e:15:d9:98:53:69:43:72:05:cc:ce:02:4e:21:
22
+ c6:38:5a:22:29:4b:18:b4:75:bb:a3:75:bf:e0:c3:
23
+ fe:80:42:7c:2e:98:18:de:ec:4e:34:95:a5:e5:fd:
24
+ 91:0a:68:d2:7c:23:13:22:66:ef:e2:04:d1:ab:59:
25
+ d1:5b:dd:ab:f3:4d:4a:11:78:dd:74:7d:7d:b6:77:
26
+ 6d:6b:02:97:d8:6f:a8:dc:0c:81:ec:a8:09:18:b5:
27
+ 7e:dd:02:a3:1f:78:81:a3:9a:a7:38:5f:2e:18:bb:
28
+ c7:39:fd:bc:95:bb:4d:88:04:8f:61:e5:b8:28:4c:
29
+ a5:7d:25:dc:3c:00:d9:db:3c:1a:37:05:2f:69:60:
30
+ a2:f9:95:7d:98:56:cf:cd:c3:49:a0:20:54:b9:72:
31
+ e0:8c:1c:e9:0a:7a:43:d4:b1:af:2c:09:84:e3:b6:
32
+ 45:6b:42:ec:27:24:e3:11:78:f1:cd:2b:44:87:63:
33
+ 19:cf:f2:22:93:f0:64:ba:f6:74:4e:9e:26:de:93:
34
+ b8:74:0f:ef:82:5c:de:26:ab:31:af:b7:fe:6b:b1:
35
+ 4e:4d:95:df:c6:02:ca:8c:f8:ca:c2:ca:dc:16:58:
36
+ f0:67:a0:d1:c2:a0:dc:3e:23:91:a1:c7:5e:7f:ee:
37
+ 8f:43:d5:d9:2c:fb:9a:a6:ce:69:67:01:f7:55:f1:
38
+ e3:7c:49:9f:48:e9:79:e6:1e:21:88:37:85:91:09:
39
+ 2b:9b:27:12:90:4d:42:bc:a0:04:15:51:72:2b:97:
40
+ bb:05:73:ff:b8:f9:c1:6e:4a:b6:ca:75:db:d3:25:
41
+ 43:cf:f1:4d:cc:ad:16:6b:4b:1a:31:10:78:2a:ac:
42
+ 53:b3:c7:08:dd:d0:f6:65:d5:73:59:cb:27:f2:fb:
43
+ 5a:70:c9:45:85:89:43:91:75:0c:9c:36:c2:89:5b:
44
+ c5:86:0a:1b:c1:d7:1b:67:5f:06:d4:56:a0:c0:46:
45
+ e1:d7:91:0e:c0:bb:e5:20:77:d1:bb:fc:86:f2:e9:
46
+ 8d:11:61:88:56:6f:0e:93:82:c3:09:4f:19:60:4c:
47
+ 75:36:b7:17:e6:31:e8:fd:65:2d:16:22:4f:c0:26:
48
+ b1:3c:2f:2e:06:97:98:03:ee:5f:45:dd:5f:11:4b:
49
+ 86:43:45:89:3b:c4:8c:24:71:fe:f9:cf:cc:2a:b7:
50
+ 33:37:f3
51
+ Exponent: 65537 (0x10001)
52
+ X509v3 extensions:
53
+ X509v3 Authority Key Identifier:
54
+ keyid:B0:45:1A:51:FB:96:CE:62:C7:FD:5E:73:CF:F9:9A:E0:71:F8:AC:61
55
+
56
+ X509v3 Basic Constraints: critical
57
+ CA:TRUE, pathlen:0
58
+ X509v3 Extended Key Usage:
59
+ TLS Web Client Authentication, TLS Web Server Authentication
60
+ X509v3 Key Usage: critical
61
+ Certificate Sign, CRL Sign
62
+ X509v3 Subject Key Identifier:
63
+ 44:00:ED:DC:BF:56:82:17:0B:8A:0B:77:AF:68:B1:3B:18:51:DD:0E
64
+ Signature Algorithm: sha256WithRSAEncryption
65
+ 13:7c:9b:15:63:61:d1:19:95:22:06:b6:c3:7d:8f:f5:88:55:
66
+ d7:69:3d:e2:51:c1:c9:6d:9a:a1:61:83:d4:09:e0:2e:df:04:
67
+ b9:48:b5:36:d8:26:17:65:f6:73:45:c2:ae:a6:ce:1e:6b:61:
68
+ f6:ea:39:17:2f:c8:3b:bc:99:09:3f:e6:f6:5a:0e:18:f1:d6:
69
+ 01:b3:18:67:d9:55:af:ec:c1:f7:13:af:6f:28:9d:5d:91:e6:
70
+ 92:07:1b:1f:69:80:86:69:cd:15:f1:e5:a2:d1:fd:93:d6:9f:
71
+ 8b:58:60:be:09:d9:c5:18:53:3d:c6:40:8a:8d:d7:0e:e1:bb:
72
+ 21:3d:36:c2:e5:ef:a3:d8:b7:fa:b0:83:f2:f9:2a:8d:bf:8f:
73
+ ea:62:0e:2a:21:a1:ea:6e:99:d3:06:e7:2c:9b:cb:51:46:1d:
74
+ 6b:4e:78:6e:72:dd:cb:97:7e:77:01:86:19:de:c6:da:30:35:
75
+ 1c:29:6a:f6:55:90:a8:f9:13:62:77:cc:80:90:02:69:a6:6b:
76
+ c8:18:2b:7b:5f:11:a3:c6:16:12:a8:62:75:8a:4e:49:a6:bf:
77
+ 77:cd:69:2c:e4:9c:50:7d:a7:87:c2:14:cd:c6:43:41:36:5a:
78
+ 10:0c:97:83:d4:9e:14:0d:76:33:7f:4a:0a:8a:1f:cf:25:ec:
79
+ 63:a0:aa:bc:27:7d:bb:78:69:bf:2d:dd:fb:7b:cc:e0:20:9c:
80
+ 7f:a5:75:09:0e:80:bf:e3:3c:24:3b:31:b4:4b:f3:01:78:65:
81
+ 70:aa:2e:5d:cb:32:a3:c3:c6:db:08:74:3c:4a:21:48:24:c5:
82
+ cd:c3:8f:42:81:f0:13:8e:b1:1f:eb:c0:db:81:43:5e:41:3c:
83
+ 25:dc:3b:6a:59:5d:ab:ab:2a:33:62:58:33:6a:6e:0b:2f:e1:
84
+ 64:ca:ba:8e:55:df:18:6f:9c:cd:bb:97:9c:bb:da:57:01:11:
85
+ ca:3d:82:99:8b:ce:b6:55:a0:58:9e:bc:ec:28:70:8d:bf:43:
86
+ 66:71:c6:f3:5b:1b:dc:45:9c:cb:06:b9:b9:e3:a7:00:1a:6a:
87
+ 0e:66:4d:c3:75:94:35:13:32:13:18:e1:8e:cc:d9:18:36:0c:
88
+ 85:a5:3c:a1:b0:f1:84:f9:17:4e:7f:f5:c0:57:f2:5e:a8:b9:
89
+ 76:ec:b0:32:95:7e:1f:70:22:bd:b2:da:80:1f:d6:9e:6a:2d:
90
+ 7b:a9:56:44:45:25:3d:5f:ab:1c:84:20:ff:fa:31:56:79:83:
91
+ be:1b:0f:4b:de:a1:1a:85:8c:fa:da:f6:72:7a:e3:a1:92:cd:
92
+ 47:c4:67:cf:fe:ca:37:db:21:72:ef:51:80:66:7b:c1:14:4f:
93
+ 64:15:3b:31:ca:12:01:45
94
+ -----BEGIN CERTIFICATE-----
95
+ MIIFlzCCA3+gAwIBAgIRAJDCtelq/XDkVbBuyF1LwmcwDQYJKoZIhvcNAQELBQAw
96
+ PjELMAkGA1UEBhMCQVQxEDAOBgNVBAoMB0hleGFQREYxHTAbBgNVBAMMFEhleGFQ
97
+ REYgRGVtbyBSb290IENBMCAXDTIxMTIyMjA4MjQxOVoYDzIxMjExMTI4MDgyNDE5
98
+ WjBFMQswCQYDVQQGEwJBVDEQMA4GA1UECgwHSGV4YVBERjEkMC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QEBCwUAA4ICAQATfJsVY2HRGZUiBrbDfY/1iFXXaT3iUcHJbZqhYYPUCeAu3wS5
115
+ SLU22CYXZfZzRcKups4ea2H26jkXL8g7vJkJP+b2Wg4Y8dYBsxhn2VWv7MH3E69v
116
+ KJ1dkeaSBxsfaYCGac0V8eWi0f2T1p+LWGC+CdnFGFM9xkCKjdcO4bshPTbC5e+j
117
+ 2Lf6sIPy+SqNv4/qYg4qIaHqbpnTBucsm8tRRh1rTnhuct3Ll353AYYZ3sbaMDUc
118
+ KWr2VZCo+RNid8yAkAJppmvIGCt7XxGjxhYSqGJ1ik5Jpr93zWks5JxQfaeHwhTN
119
+ xkNBNloQDJeD1J4UDXYzf0oKih/PJexjoKq8J327eGm/Ld37e8zgIJx/pXUJDoC/
120
+ 4zwkOzG0S/MBeGVwqi5dyzKjw8bbCHQ8SiFIJMXNw49CgfATjrEf68DbgUNeQTwl
121
+ 3DtqWV2rqyozYlgzam4LL+FkyrqOVd8Yb5zNu5ecu9pXARHKPYKZi862VaBYnrzs
122
+ KHCNv0NmccbzWxvcRZzLBrm546cAGmoOZk3DdZQ1EzITGOGOzNkYNgyFpTyhsPGE
123
+ +RdOf/XAV/JeqLl27LAylX4fcCK9stqAH9aeai17qVZERSU9X6schCD/+jFWeYO+
124
+ Gw9L3qEahYz62vZyeuOhks1HxGfP/so32yFy71GAZnvBFE9kFTsxyhIBRQ==
125
+ -----END CERTIFICATE-----
@@ -130,6 +130,26 @@ module HexaPDF
130
130
  output_line("Encrypted", "yes (no or wrong password given)")
131
131
  end
132
132
 
133
+ signatures = doc.signatures.to_a
134
+ unless signatures.empty?
135
+ nr_sigs = signatures.count
136
+ output_line("Document signed", "yes - #{nr_sigs} signature#{nr_sigs > 1 ? 's' : ''}")
137
+ signatures.each do |signature|
138
+ output_line(" Signer", signature.signer_name)
139
+ output_line(" Signing time", signature.signing_time)
140
+ if (reason = signature.signing_reason)
141
+ output_line(" Reason", reason)
142
+ end
143
+ if (location = signature.signing_location)
144
+ output_line(" Location", location)
145
+ end
146
+ output_line(" Signature type", signature.signature_type)
147
+ signature.verify(allow_self_signed: true).messages.sort.each do |msg|
148
+ output_line(" #{msg.type.capitalize}", msg.content)
149
+ end
150
+ end
151
+ end
152
+
133
153
  output_line("Pages", doc.pages.count.to_s)
134
154
  output_line("Version", doc.version)
135
155
  end
@@ -162,7 +182,7 @@ module HexaPDF
162
182
  end
163
183
 
164
184
  def output_line(header, text) #:nodoc:
165
- puts(("#{header}:").ljust(COLUMN_WIDTH) << text)
185
+ puts(("#{header}:").ljust(COLUMN_WIDTH) << text.to_s)
166
186
  end
167
187
 
168
188
  end
@@ -373,6 +373,20 @@ module HexaPDF
373
373
  #
374
374
  # See HexaPDF::Layout::Style::Layers for more information.
375
375
  #
376
+ # signature.signing_handler::
377
+ # A mapping from a Symbol to a signing handler class (see
378
+ # HexaPDF::Document::Signatures::DefaultHandler). If the value is a String, it should contain
379
+ # the name of a constant to such a class.
380
+ #
381
+ # signature.sub_filter_map::
382
+ # A mapping from a PDF name (a Symbol) to a signature handler class (see
383
+ # HexaPDF::Type::Signature::Handler). If the value is a String, it should contain the name of a
384
+ # constant to such a class.
385
+ #
386
+ # The sub filter map is used for mapping specific signature algorithms to handler classes. The
387
+ # filter value of a signature dictionary is ignored since we only support the standard
388
+ # signature algorithms.
389
+ #
376
390
  # task.map::
377
391
  # A mapping from task names to callable task objects. See HexaPDF::Task for more information.
378
392
  DefaultDocumentConfiguration =
@@ -451,6 +465,14 @@ module HexaPDF
451
465
  'style.layers_map' => {
452
466
  link: 'HexaPDF::Layout::Style::LinkLayer',
453
467
  },
468
+ 'signature.signing_handler' => {
469
+ default: 'HexaPDF::Document::Signatures::DefaultHandler',
470
+ },
471
+ 'signature.sub_filter_map' => {
472
+ 'adbe.x509.rsa_sha1': 'HexaPDF::Type::Signature::AdbeX509RsaSha1',
473
+ 'adbe.pkcs7.detached': 'HexaPDF::Type::Signature::AdbePkcs7Detached',
474
+ 'ETSI.CAdES.detached': 'HexaPDF::Type::Signature::AdbePkcs7Detached',
475
+ },
454
476
  'task.map' => {
455
477
  optimize: 'HexaPDF::Task::Optimize',
456
478
  dereference: 'HexaPDF::Task::Dereference',
@@ -539,6 +561,10 @@ module HexaPDF
539
561
  SigFieldLock: 'HexaPDF::Type::AcroForm::SignatureField::LockDictionary',
540
562
  SV: 'HexaPDF::Type::AcroForm::SignatureField::SeedValueDictionary',
541
563
  SVCert: 'HexaPDF::Type::AcroForm::SignatureField::CertificateSeedValueDictionary',
564
+ Sig: 'HexaPDF::Type::Signature',
565
+ DocTimeStamp: 'HexaPDF::Type::Signature',
566
+ SigRef: 'HexaPDF::Type::Signature::SignatureReference',
567
+ TransformParams: 'HexaPDF::Type::Signature::TransformParams',
542
568
  },
543
569
  'object.subtype_map' => {
544
570
  nil => {