canon 0.3.70 → 0.3.71

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a8ff57b9e99197b824e486af4f029cd005cce5e263cfa7433a3e7351d356d55
4
- data.tar.gz: 9737c271ceeaa5be0358f56f86891e02cd5c34c099721b6ba3deaaf107937256
3
+ metadata.gz: 958eeca178b78a0f3de23eb6ab23674aacb3fee50c6671da8911b1225431278f
4
+ data.tar.gz: e9d9cee428547b4117a7b15e335f9b31ae0c76bb9120c76b0f362e5a499dfde8
5
5
  SHA512:
6
- metadata.gz: d2f9294a68dc860dc315331b083b62e3661c42c69b1a44ac2984b0f29f39c998b6d90464972d04bdb763d370cc1668e8245e19a0db02eee4d1907946ab529ae1
7
- data.tar.gz: d36159fe358cef45d398c7deb0137354dbfa5f78e45850adc28cdda30f821561797340dc0f58da1c51284d6c619f5403de52f2a7b7f1549bdcaf56ec02631c6d
6
+ metadata.gz: 17f11eed81fe5f50ef94ca58ea8ce3932281b0b478a8143439c148e15fd4519abe0d754e9a14d23b294f366523668c97ac21d96418190fbc7c65e3a86373b77a
7
+ data.tar.gz: 7a3cf3fb1b732e84a7167a7f184cd2085afa43023829f77021e91197c40c4e8d9f9910847ca18d641d144c3c7aecb55cea5657441e726f95833210f333bbc705
@@ -342,6 +342,17 @@ puts "Defaults: #{resolver.defaults.inspect}"
342
342
  puts "Source of algorithm: #{resolver.source_for(:algorithm)}"
343
343
  ----
344
344
 
345
+ === Engine digests: LEPTRIS_DIGEST_ATTR_ORDER
346
+
347
+ Canon's XML digest gate reads one *engine-level* variable that belongs to
348
+ libleptris, not to canon. Canon never sets it — the host decides:
349
+
350
+ `LEPTRIS_DIGEST_ATTR_ORDER=1`:: Makes attribute order identity-bearing in
351
+ libleptris' structural digests. Canon detects this and skips the SAX
352
+ signature probe in verbose diff reports — attribute-order identity is then
353
+ proven by the digest itself. Digest *values* change process-wide, so enable
354
+ it only if nothing in your process persists leptris digests across restarts.
355
+
345
356
  == See also
346
357
 
347
358
  * link:size-limits/[Size Limits] - File size and node count limits
@@ -206,6 +206,10 @@ module Canon
206
206
  # already declined any recover-error document through the
207
207
  # wrapper's parse_diagnostics — the banner cannot be lost.
208
208
  return true if n1 == n2
209
+ # With order-sensitive digests (host-set flag), attribute
210
+ # order is digest-proven as well — the signature probe has
211
+ # nothing left to answer.
212
+ return true if Xml::DigestGate.attr_order_digest?
209
213
 
210
214
  left = Xml::Sax.probe(n1)
211
215
  return false if left.saw_error?
data/lib/canon/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Canon
4
- VERSION = "0.3.70"
4
+ VERSION = "0.3.71"
5
5
  end
@@ -30,6 +30,17 @@ module Canon
30
30
  !doc.parse_diagnostics.empty?
31
31
  end
32
32
 
33
+ # Whether the HOST opted into attribute-order-sensitive digests
34
+ # (libleptris 1.9.228 honors LEPTRIS_DIGEST_ATTR_ORDER per
35
+ # digest call; leptris#1297). Canon reads the env — never
36
+ # writes it: the flag re-spaces digest values process-wide, so
37
+ # enabling it is the host's call, not a library's. When set,
38
+ # digest equality proves attribute-order identity too, and the
39
+ # verbose lane's signature probe becomes redundant.
40
+ def attr_order_digest?
41
+ ENV["LEPTRIS_DIGEST_ATTR_ORDER"] == "1"
42
+ end
43
+
33
44
  def available?
34
45
  return false if RUBY_ENGINE == "opal"
35
46
  return false unless Canon::XmlBackend.moxml? &&
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.70
4
+ version: 0.3.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.