ssltool 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 486095b2c7baa9b9746d36e49907b08cf39f75f3
4
- data.tar.gz: 3a59aac8a822936db0f48d70a7d9fc8af811c0b0
3
+ metadata.gz: 00acc97c34c1f47fcc5cbf00dba1e05ecddd5a85
4
+ data.tar.gz: 60db4e3ed86c4565d1697843e8999f88fb47cd20
5
5
  SHA512:
6
- metadata.gz: 75ccaa67d69f329cf52fa597f9eb36e0aeea8a99476807d87f4efff980377d25c7364540b6306e767cc8dbfb9ef5d8b7fb82b55e42a3cb0caced40b85de005c7
7
- data.tar.gz: 9a08eb4277cd89fa98255a65b80bfe8117987f2022aacd6e5c8a43d26abb93ba1a634cc87220cf50ae44bd41d3535ffbc488869b7a02fc121200f72b42aefa3c
6
+ metadata.gz: df65ca049c8d2c6c2189e2e4126ec23eae7c525b5831acd0ad5a4ba4bdeef48e115c4e8206ddeff452f1ba463984ca9f53d927dac0090319a8a0514be3ba46a9
7
+ data.tar.gz: 27792d65f565ca941bb168eed1e8bd96000f5e1e5f3f6b79c0edde8a224dfc8f36b1387766680fbd383fc5c6f3c4b57e1a1469a6949f8f3a3b167e2c3ddccf24
@@ -14,8 +14,8 @@ module SSLTool
14
14
  def initialize(store_url)
15
15
  @circular_chain_notification_callbacks = []
16
16
  @adapter = self.class.instantiate_adapter(store_url)
17
- @trusted_pool = @adapter.load_pool(:trusted).select(&:acceptable?)
18
- @intermediate_pool = @adapter.load_pool(:intermediate).select(&:acceptable?)
17
+ @trusted_pool = @adapter.load_pool(:trusted).keep_if(&:acceptable?)
18
+ @intermediate_pool = @adapter.load_pool(:intermediate).keep_if(&:acceptable?)
19
19
  @excluded_pool = @adapter.load_pool(:excluded)
20
20
  end
21
21
 
@@ -45,10 +45,11 @@ module SSLTool
45
45
 
46
46
  def detect_and_merge_intermediates!(unfiltered_pool, strict = true)
47
47
  return if combined_trusted_pool_set.superset?(unfiltered_pool.to_set)
48
- viable_pool = unfiltered_pool.select { |c|
49
- !strict || c.version < 2 ? !c.for_domain_name? : c.certificate_authority? && c.certificate_sign? }
50
- .select(&:acceptable?)
51
- return if combined_trusted_pool_set.superset?(viable_pool.to_set)
48
+ viable_pool = unfiltered_pool
49
+ .select { |c| !strict || c.version < 2 ? !c.for_domain_name? : c.certificate_authority? && c.certificate_sign? }
50
+ .select(&:acceptable?)
51
+ .to_set
52
+ return if combined_trusted_pool_set.superset?(viable_pool)
52
53
  working_pool = intermediate_pool + viable_pool - excluded_pool
53
54
  all_chains = working_pool.map { |cert| cert.chain_from(working_pool) }
54
55
  unique_chains = all_chains.sort_by(&:length).reverse.inject([]) { |chains, chain|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssltool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caio Chassot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-23 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Orders and completes SSL certificate trust chains, maintains an up-to-date
14
14
  pool of viable intermediates and trusted roots, and provides other tooling for dealing